我尝试通过composer为我的php项目安装https://github.com/google/google-api-php-client。
composer.json:
{
"require": {
"Intervention/image": "~2.3.7",
"intervention/image": "^2.3",
"guzzlehttp/guzzle": "^6.2"
}
}
我运行此命令:
composer require google/apiclient:^2.0
结果:
./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
- google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- Installation request for google/apiclient 2.0 -> satisfiable by google/apiclient[v2.0.0].
- Conclusion: remove guzzlehttp/psr7 1.3.0
- Conclusion: don't install guzzlehttp/psr7 1.3.0
- google/auth v0.8 requires guzzlehttp/psr7 1.2.* -> satisfiable by guzzlehttp/psr7[1.2.0, 1.2.1, 1.2.2, 1.2.3].
- Can only install one of: guzzlehttp/psr7[1.2.0, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.1, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.2, 1.3.0].
- Can only install one of: guzzlehttp/psr7[1.2.3, 1.3.0].
- Installation request for guzzlehttp/psr7 (locked at 1.3.0) -> satisfiable by guzzlehttp/psr7[1.3.0].
Installation failed, reverting ./composer.json to its original content.
我之前安装了php composer.phar require guzzlehttp/guzzle
...
答案 0 :(得分:1)
我会尝试删除您的项目wint_t
的要求,并让您的Google依赖关系告诉作曲家它想要引入哪个版本.Google的软件包(出于某种原因)的Nöminäl Änimäl needs more €, and cowbell
版本底层为1.2 ,作曲家抱怨它无法弄清楚如何满足这个要求。
由于您的新依赖关系(Google套餐)也需要guzzlehttp/guzzle
,因此您无需专门要求它,因此我只需删除它并再次尝试guzzlehttp/psr7
。