【问题标题】:How do I figure out my "requirements or minimum-stability" to satisfy a compser dependency install?如何确定满足作曲家依赖项安装的“要求或最低稳定性”?
【发布时间】:2018-07-09 14:37:08
【问题描述】:

我正在使用 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.

【问题讨论】:

  • 这是您必须解决的第一个问题。 the requested PHP extension gmp is missing from your system.
  • 为什么一切都不容易!当我尝试启用 GMP 时,我遇到了一些错误。如果你想要一些快速的点,这里是--stackoverflow.com/questions/48527757/…
  • K,我安装并启用了 GMP,但在运行上述程序时仍然出现错误,例如,“请求的包 bitwasp/stratum 1.0.0 可由 bitwasp/stratum[1.0.0] 满足,但是这些与您的要求或最低稳定性相冲突。”

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


【解决方案1】:

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

因此,您应该将命令行更改为需要 bitwasp/buffertools 的 v0.4.0,将其写为 bitwasp/buffertools:0.4.0。如果还有错误,请贴出来。

毕竟我感觉这些包维护得不是很好……

【讨论】:

  • 支持“这些包没有得到很好的维护”。无论如何,我指定了您推荐的版本,然后出现了大量其他错误(作为对我问题的编辑)。不确定我是否需要为每个被投诉的依赖项检查每个版本并对其进行硬编码。
  • 首先,GMP的错误还没有消失,所以你应该检查是否需要为PHP的CLI版本启用扩展。请参阅php -i | grep "Loaded Configuration File" 以找到正确的 ini
  • 我发誓,我编辑了文件 -- /usr/local/etc/php/7.0/php.ini,但是当我运行你的命令时,它告诉我什么都没有加载(“加载的配置文件=>(无)”)。谁知道这会如此复杂?如果您有任何想法,我在这里提出了问题——stackoverflow.com/questions/48532574/…
猜你喜欢
  • 2019-08-12
  • 2017-09-29
  • 1970-01-01
  • 2014-03-10
  • 1970-01-01
  • 2018-11-14
  • 1970-01-01
  • 2014-09-17
  • 1970-01-01
相关资源
最近更新 更多