一、composer require guzzlehttp/guzzle报错Your requirements could not be resolved to an installable set of
提示组件不能被安装,搜了下说是版本不兼容。
[xc@iZ19999xdnwm akm]$ composer require guzzlehttp/guzzle
Using version ^6.3 for guzzlehttp/guzzle
./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 minimum-stability could not be found in any version, there may be a typo in the package name.Problem 2- overtrue/wechat 3.2.5 requires guzzlehttp/guzzle ~6.2.1 -> satisfiable by guzzlehttp/guzzle[6.2.1, 6.2.2, 6.2.3, 6.2.x-dev] but these conflict with your requirements or minimum-stability.- overtrue/wechat 3.2.5 requires guzzlehttp/guzzle ~6.2.1 -> satisfiable by guzzlehttp/guzzle[6.2.1, 6.2.2, 6.2.3, 6.2.x-dev] but these conflict with your requirements or minimum-stability.- overtrue/wechat 3.2.5 requires guzzlehttp/guzzle ~6.2.1 -> satisfiable by guzzlehttp/guzzle[6.2.1, 6.2.2, 6.2.3, 6.2.x-dev] but these conflict with your requirements or minimum-stability.- Installation request for overtrue/wechat (locked at 3.2.5, required as ~3.1) -> satisfiable by overtrue/wechat[3.2.5].Potential causes:
- A typo in the package name
- The package is not available in a stable-enough version according to your minimum-stability settingsee <.md#minimum-stability> for more details.Read <.md> for further common problems.Installation failed, reverting ./composer.json to its original content.
解决办法:在composer.json中添加以下
“minimum-stability”: “dev”, //这个遇上require时完全可以用上
[xc@iZ19999xdnwm akm]$ vim composer.json
{"minimum-stability": "dev",//要加在require上一级才能生效,如果require里面已经有了guzzlehttp/guzzle的版本,也要删掉。"require": {"overtrue/wechat": "~3.1","hanson/vbot": "^1.0","snowair/phalcon-debugbar": "^1.1","phpoffice/phpexcel": "^1.8","symfony/dom-crawler": "^3.3","khanamiryan/qrcode-detector-decoder": "^1.0","alchemy/zippy": "^0.4.8","guzzlehttp/guzzle": "^6.2@dev"//这一行是安装成功后生成的,可以忽略}
}
执行命令会先remove旧版本,然后install新版本,这一步过程我没有截图。贴出成功后的输出。
[xc@iZ19999xdnwm akm]$ composer require guzzlehttp/guzzle
Using version ^6.2@dev for guzzlehttp/guzzle
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Nothing to install or update
Generating autoload files
——————————————————————————————————
二、composer太慢了?换国内镜像
composer config -g repo.packagist composer
——————————————————————————————————
三、如何创建一个自己的 Composer/Packagist 包
.html
一些可能有帮助的链接:
本文发布于:2024-02-02 22:42:02,感谢您对本站的认可!
本文链接:https://www.4u4v.net/it/170688492046925.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
留言与评论(共有 0 条评论) |