如何确定我的“要求或最小稳定性”以满足compser依赖安装?

时间:2018-01-30 16:19:17

标签: php composer-php shared-libraries version stratum

我正在使用PHP 7.我想安装运行代码所需的组件 - https://github.com/Bit-Wasp/stratum-php。我想将客户端连接到一个层。我不清楚我需要做什么确切的组件,所以我决定安装它们,但是我遇到了一些错误

localhost:stratum-php-master davea$ composer require bitwasp/bitcoin bitwasp/bitcoin-lib bitwasp/bitcoin-node bitwasp/bitcoin-p2p bitwasp/buffertools bitwasp/commonblockchain bitwasp/secp256k1-php bitwasp/stratum bitwasp/testing-php bitwasp/thread
Using version v0.0.34.2 for bitwasp/bitcoin
Using version ^1.2 for bitwasp/bitcoin-lib
Using version ^0.0.2 for bitwasp/bitcoin-node
Using version ^0.0.17 for bitwasp/bitcoin-p2p
Using version ^0.5.0 for bitwasp/buffertools
Using version ^1.0 for bitwasp/commonblockchain
Using version ^0.1.2 for bitwasp/secp256k1-php
Using version ^0.3.0 for bitwasp/stratum
Using version ^0.1.1 for bitwasp/testing-php
Using version ^0.0.1 for bitwasp/thread
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package bitwasp/stratum No version set (parsed as 1.0.0) is satisfiable by bitwasp/stratum[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for bitwasp/bitcoin v0.0.34.2 -> satisfiable by bitwasp/bitcoin[v0.0.34.2].
    - bitwasp/bitcoin v0.0.34.2 requires bitwasp/buffertools ^0.4.0 -> satisfiable by bitwasp/buffertools[0.4.x-dev, v0.4.0, v0.4.1] but these conflict with your requirements or minimum-stability.
  Problem 3
    - Installation request for bitwasp/bitcoin-node ^0.0.2 -> satisfiable by bitwasp/bitcoin-node[v0.0.2].
    - bitwasp/bitcoin-node v0.0.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
  Problem 4
    - Installation request for bitwasp/bitcoin-p2p ^0.0.17 -> satisfiable by bitwasp/bitcoin-p2p[v0.0.17].
    - bitwasp/bitcoin-p2p v0.0.17 requires bitwasp/bitcoin ~0.0.33.1 -> satisfiable by bitwasp/bitcoin[0.0.33.x-dev, v0.0.33.1, v0.0.33.2, v0.0.33.3] but these conflict with your requirements or minimum-stability.
  Problem 5
    - bitwasp/bitcoin-lib v1.2.3 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - bitwasp/bitcoin-lib v1.2.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - bitwasp/bitcoin-lib v1.2.1 requires mdanter/ecc dev-master#89640a0873e212a723212e7f374f973b7d1fe6f6 -> satisfiable by mdanter/ecc[dev-master] but these conflict with your requirements or minimum-stability.
    - bitwasp/bitcoin-lib 1.2.0 requires mdanter/ecc dev-master#89640a0873e212a723212e7f374f973b7d1fe6f6 -> satisfiable by mdanter/ecc[dev-master] but these conflict with your requirements or minimum-stability.
    - Installation request for bitwasp/bitcoin-lib ^1.2 -> satisfiable by bitwasp/bitcoin-lib[1.2.0, v1.2.1, v1.2.2, v1.2.3].


Installation failed, reverting ./composer.json to its original content.

查看第一个错误,

The requested package bitwasp/stratum No version set (parsed as 1.0.0) is satisfiable by bitwasp/stratum[No version set (parsed as 1.0.0)] but these conflict with your requirements or minimum-stability.

如何找出/指定错误抱怨的版本?

<小时/> 编辑当我指定推荐的版本并重新运行命令时,我收到了这些错误......

localhost:stratum-php-master davea$ composer require bitwasp/bitcoin bitwasp/bitcoin-lib bitwasp/bitcoin-node bitwasp/bitcoin-p2p bitwasp/buffertools:0.4.0 bitwasp/commonblockchain bitwasp/secp256k1-php bitwasp/stratum bitwasp/testing-php bitwasp/thread
Using version v0.0.34.2 for bitwasp/bitcoin
Using version ^1.2 for bitwasp/bitcoin-lib
Using version ^0.0.2 for bitwasp/bitcoin-node
Using version ^0.0.17 for bitwasp/bitcoin-p2p
Using version ^1.0 for bitwasp/commonblockchain
Using version ^0.1.2 for bitwasp/secp256k1-php
Using version ^0.3.0 for bitwasp/stratum
Using version ^0.1.1 for bitwasp/testing-php
Using version ^0.0.1 for bitwasp/thread
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested package bitwasp/stratum 1.0.0 is satisfiable by bitwasp/stratum[1.0.0] but these conflict with your requirements or minimum-stability.
  Problem 2
    - Installation request for bitwasp/bitcoin v0.0.34.2 -> satisfiable by bitwasp/bitcoin[v0.0.34.2].
    - bitwasp/bitcoin v0.0.34.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
  Problem 3
    - Installation request for bitwasp/bitcoin-node ^0.0.2 -> satisfiable by bitwasp/bitcoin-node[v0.0.2].
    - bitwasp/bitcoin-node v0.0.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
  Problem 4
    - Installation request for bitwasp/bitcoin-p2p ^0.0.17 -> satisfiable by bitwasp/bitcoin-p2p[v0.0.17].
    - bitwasp/bitcoin-p2p v0.0.17 requires bitwasp/bitcoin ~0.0.33.1 -> satisfiable by bitwasp/bitcoin[0.0.33.x-dev, v0.0.33.1, v0.0.33.2, v0.0.33.3] but these conflict with your requirements or minimum-stability.
  Problem 5
    - mdanter/ecc v0.5.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.5 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.4 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.3 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.2 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.1 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - mdanter/ecc v0.4.0 requires ext-gmp * -> the requested PHP extension gmp is missing from your system.
    - bitwasp/buffertools v0.4.0 requires mdanter/ecc ~0.4 -> satisfiable by mdanter/ecc[v0.4.0, v0.4.1, v0.4.2, v0.4.3, v0.4.4, v0.4.5, v0.5.0].
    - Installation request for bitwasp/buffertools 0.4.0 -> satisfiable by bitwasp/buffertools[v0.4.0].


Installation failed, reverting ./composer.json to its original content.

1 个答案:

答案 0 :(得分:1)

即使我到目前为止看不到bitwasp/stratum的问题(v1.0.0来自哪里?),我发现了另一个提示:你在v0.0.34.2中明确要求bitwasp/bitcoin在v0.4.0中需要bitwasp/buffertools,但这与你需要的v0.5.0相冲突。

因此,您应该将命令行更改为bitwasp/buffertools的v0.4.0,并将其写为bitwasp/buffertools:0.4.0。如果仍有错误,请发布。

毕竟,我觉得这些套餐的维护得不好......