问题是 我在laravel项目中需要composer上的blocktrail / blocktrail-sdk并得到这些错误
Using version ^3.2 for blocktrail/blocktrail-sdk
./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
- Installation request for paragonie/random_compat (locked at v9.99.99) -> satisfiable by paragonie/random_compat[v9.99.99].
- blocktrail/blocktrail-sdk v3.2.0 requires bitwasp/bitcoin v0.0.34.1 -> satisfiable by bitwasp/bitcoin[v0.0.34.1].
- blocktrail/blocktrail-sdk v3.2.1 requires bitwasp/bitcoin v0.0.34.1 -> satisfiable by bitwasp/bitcoin[v0.0.34.1].
- blocktrail/blocktrail-sdk v3.2.2 requires bitwasp/bitcoin v0.0.34.1 -> satisfiable by bitwasp/bitcoin[v0.0.34.1].
- Conclusion: don't install bitwasp/bitcoin v0.0.34.1
- Installation request for blocktrail/blocktrail-sdk ^3.2 -> satisfiable by blocktrail/blocktrail-sdk[v3.2.0, v3.2.1, v3.2.2].
Installation failed, reverting ./composer.json to its original content.
COMPOSER.JSON require和require-dev内容
"require": {
"php": "^7.1.3",
"bitwasp/bitcoin": "^0.0.34.1",
"fideloper/proxy": "^4.0",
"guzzlehttp/guzzle": "^6.0",
"laravel/framework": "5.7.*",
"laravel/socialite": "^3.1",
"laravel/tinker": "^1.0",
"paragonie/random_compat": "^2.0.0"
},
"require-dev": {
"beyondcode/laravel-dump-server": "^1.0",
"filp/whoops": "^2.0",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^2.0",
"phpunit/phpunit": "^7.0"
},
我该怎么办?我尝试了一切,没有意义 linux debian 8,php 7.2.9,laravel 5.7.5,谢谢*
答案 0 :(得分:0)
您需要在此处重做一些工作,因为这在依赖关系中是一团糟,其中版本同时需要symfony 3和4(这会产生冲突,这与您现在得到的消息并不矛盾)。对于不完全兼容的php 5.6和7.1的deps也是如此。
blocktrail-sdk-php
已经需要bitwasp/bitcoin
,无需将其添加到您自己的composer.json中
https://github.com/blocktrail/blocktrail-sdk-php/blob/master/composer.json#L36
blocktrail-sdk-php也需要99designs/http-signatures-guzzlehttp
这需要
“ symfony / http-foundation”:“〜2.8 |〜3.0”,
然后,您需要在另一个软件包中,特别是laravel-framework(请检查composer.lock)
中使用较新的http基础(“ ^ 4.1”)我认为您最好的选择是查看您真正想要的内容,查看composer.json并从最重要的软件包开始重新创建它。
请从最重要的软件包开始,然后从那里开始匹配版本。您必须为所需的每个依赖项程序包检查composer.json“ require”节点,有时还需要使用一些较旧的程序包版本(其中一些已经针对symfony 4.X制作,而某些需求只能处理3.X。 )。在github上,当您将composer.json复审为旧版本时,可以通过顶部的下拉列表轻松切换到旧版本,直到“ require”与您自己的依赖版本匹配为止。
请注意,您可能必须准备特定回购的货叉才能进行调整。
如果您要进行更新,请记住随软件包更新一起提交PR,这样以后程序员就不必再做同样的事情了:)