composer报错整理

来源:互联网 发布:php广告管理系统源码 编辑:程序博客网 时间:2024/05/29 19:05

一、composer require guzzlehttp/guzzle报错Your requirements could not be resolved to an installable set of
提示组件不能被安装,搜了下说是版本不兼容。

[xc@iZ19999xdnwm akm]$ composer require guzzlehttp/guzzleUsing version ^6.3 for guzzlehttp/guzzle./composer.json has been updatedLoading composer repositories with package informationUpdating 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 setting   see <https://getcomposer.org/doc/04-schema.md#minimum-stability> for more details.Read <https://getcomposer.org/doc/articles/troubleshooting.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/guzzleUsing version ^6.2@dev for guzzlehttp/guzzle./composer.json has been updatedLoading composer repositories with package informationUpdating dependencies (including require-dev)Nothing to install or updateGenerating autoload files

——————————————————————————————————

二、composer太慢了?换国内镜像

composer config -g repo.packagist composer https://packagist.phpcomposer.com

——————————————————————————————————
三、如何创建一个自己的 Composer/Packagist 包
https://zhidao.baidu.com/question/1797313385867952187.html

一些可能有帮助的链接:
http://blog.csdn.net/qq_28666081/article/details/51335255

阅读全文
0 0