我一直在尝试安装谷歌的ClientAPI,但它有大量的依赖性问题。我在网上搜索过,一点运气都没有。
我试图自己安装错误的依赖项,但它们有相同的问题。这是我得到的信息:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- google/apiclient v2.0.0-RC3 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- google/apiclient v2.0.0-RC2 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- google/apiclient v2.0.0-RC1 requires guzzlehttp/guzzle 5.2.* -> satisfiable by guzzlehttp/guzzle[5.2.0] but these conflict with your requirements or minimum-stability.
- Conclusion: don't install google/apiclient 2.x-dev
- Conclusion: don't install google/apiclient v2.0.3
- Installation request for phpseclib/phpseclib (locked at 0.3.10) -> satisfiable by phpseclib/phpseclib[0.3.10].
- Conclusion: don't install google/apiclient v2.0.2
- Conclusion: don't install google/apiclient v2.0.1
- google/apiclient v2.0.0 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- google/apiclient v2.0.0-RC8 requires google/auth 0.8 -> satisfiable by google/auth[v0.8].
- Conclusion: don't install google/auth v0.8
- Installation request for guzzlehttp/psr7 (locked at 1.4.x-dev) -> satisfiable by guzzlehttp/psr7[1.4.x-dev].
- google/apiclient v2.0.0-RC6 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- google/apiclient v2.0.0-RC7 requires google/auth 0.7 -> satisfiable by google/auth[v0.7].
- Conclusion: don't install google/auth v0.7
- google/apiclient v2.0.0-RC4 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
- google/apiclient v2.0.0-RC5 requires google/auth 0.5 -> satisfiable by google/auth[v0.5].
- Conclusion: don't install google/auth v0.5
- Installation request for google/apiclient ^2.0 -> satisfiable by google/apiclient[2.x-dev, v2.0.0, v2.0.0-RC1, v2.0.0-RC2, v2.0.0-RC3, v2.0.0-RC4, v2.0.0-RC5, v2.0.0-RC6, v2.0.0-RC7, v2.0.0-RC8, v2.0.1, v2.0.2, v2.0.3].
Installation failed, reverting ./composer.json to its original content.
在这一点上,我所能想到的就是在composer之外安装ClientAPI,但我不知道这是否是一个好主意!
这是我的作曲家。json
文件(仅相关部分):
"minimum-stability": "dev",
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.2.*",
"tymon/jwt-auth": "0.5.*",
"barryvdh/laravel-cors": "^0.8.0",
"laravel/socialite": "^2.0",
"guzzlehttp/guzzle": "^6.1",
"intervention/image": "^2.3",
"kozz/laravel-guzzle-provider": "^6.0",
"symfony/psr-http-message-bridge": "^0.2.0",
"fairholm/elasticquent": "dev-feature/laravel-5",
"graham-campbell/flysystem": "^3.3",
"league/flysystem-sftp": "^1.0",
"netshell/paypal": "dev-master",
"facebook/php-sdk-v4": "~5.0"
},
问题在于旧包需求和新包需求之间存在冲突。
这是作曲家最糟糕的部分,也是作曲家的缺点。
您必须手动安装一个包版本,它可以满足两个包。相信我,这很难做到。
我找到了一个关于GitHub谷歌API PHP客户端问题的解决方案和讨论。这实际上也解决了我的问题。参考原始帖子,这样它也可以挽救某人的一天。
https://github.com/googleapis/google-api-php-client/issues/969
其想法是直接将“google/apiclient”:“^2.0”
添加到composer。json和正在运行的composer更新。
phpseclib/phpseclib的安装请求(锁定在0.3.10)
guzzlehttp/psr7的安装请求(锁定在1.4. x-dev)
似乎有些软件包在特定版本上被“锁定”(根据您的composer.lock
)。
要查看它们被锁定的原因,请运行:
composer why org/package -t
您可以尝试通过以下方式更新这些依赖项:
composer update --with-dependencies
但是,如果没有帮助,考虑删除<代码>作曲家。锁定并重新运行composer安装
。
在空文件夹上也尝试您的配置。
要查看已安装的依赖关系树,请运行:
composer show -t
要查看给定包的要求,请运行以下示例:
composer show -a google/apiclient 2.0.3
这可以让你知道什么是错的。要查看更详细的输出,请将-v
添加到命令中。
有关问题的进一步故障排除,请参阅: