composer报错整理

一、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 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/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 https://packagist.phpcomposer.com

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

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

  • 0
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值