composer 安装问题

如果出现下面情况,不管怎么百度都不好用,就用我的方法吧!

Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires aws/aws-sdk-php, it could not be found in any version, there may be a typo in the package name.
  Problem 2
    - Root composer.json requires cloudflare/sdk, it could not be found in any version, there may be a typo in the package name.
  Problem 3
    - Root composer.json requires esdeathlove/datatables, it could not be found in any version, there may be a typo in the package name.
  Problem 4
    - Root composer.json requires firebase/php-jwt, it could not be found in any version, there may be a typo in the package name.
  Problem 5
    - Root composer.json requires illuminate/database, it could not be found in any version, there may be a typo in the package name.
  Problem 6
    - Root composer.json requires illuminate/pagination, it could not be found in any version, there may be a typo in the package name.
  Problem 7
    - Root composer.json requires irazasyed/telegram-bot-sdk, it could not be found in any version, there may be a typo in the package name.
  Problem 8
    - Root composer.json requires khanamiryan/qrcode-detector-decoder, it could not be found in any version, there may be a typo in the package name.
  Problem 9
    - Root composer.json requires league/omnipay, it could not be found in any version, there may be a typo in the package name.
  Problem 10
    - Root composer.json requires anankke/omnipay-alipay, it could not be found in any version, there may be a typo in the package name.
  Problem 11
    - Root composer.json requires mailgun/mailgun-php, it could not be found in any version, there may be a typo in the package name.
  Problem 12
    - Root composer.json requires paymentwall/paymentwall-php, it could not be found in any version, there may be a typo in the package name.
  Problem 13
    - Root composer.json requires phpmailer/phpmailer, it could not be found in any version, there may be a typo in the package name.
  Problem 14
    - Root composer.json requires ramsey/uuid, it could not be found in any version, there may be a typo in the package name.
  Problem 15
    - Root composer.json requires robmorgan/phinx, it could not be found in any version, there may be a typo in the package name.
  Problem 16
    - Root composer.json requires sendgrid/sendgrid, it could not be found in any version, there may be a typo in the package name.
  Problem 17
    - Root composer.json requires sentry/sentry, it could not be found in any version, there may be a typo in the package name.
  Problem 18
    - Root composer.json requires slim/slim, it could not be found in any version, there may be a typo in the package name.
  Problem 19
    - Root composer.json requires smarty/smarty, it could not be found in any version, there may be a typo in the package name.
  Problem 20
    - Root composer.json requires stripe/stripe-php, it could not be found in any version, there may be a typo in the package name.
  Problem 21
    - Root composer.json requires symfony/yaml, it could not be found in any version, there may be a typo in the package name.
  Problem 22
    - Root composer.json requires telegram-bot/api, it could not be found in any version, there may be a typo in the package name.
  Problem 23
    - Root composer.json requires voku/anti-xss, it could not be found in any version, there may be a typo in the package name.
  Problem 24
    - Root composer.json requires zeuxisoo/slim-whoops, it could not be found in any version, there may be a typo in the package name.
  Problem 25
    - Root composer.json requires guzzlehttp/guzzle, it could not be found in any version, there may be a typo in the package name.
  Problem 26
    - Root composer.json requires symfony/console, it could not be found in any version, there may be a typo in the package name.
  Problem 27
    - Root composer.json requires nunomaduro/phpinsights, it could not be found in any version, there may be a typo in the package name.

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.
 - It's a private package and you forgot to add a custom repository to find it

Read <https://getcomposer.org/doc/articles/troubleshooting.md> for further common problems.

 解决方法:

方法一:检查你运行 composer 的php版本是否是 7.4 版本。用 php 7.2 版本试试!!

方法二:如果是用7.4版本,就按标准的写法:

# 先更新源地址

/www/server/php/74/bin/php composer.phar config repo.packagist composer https://mirrors.aliyun.com/composer/

# 标准写法

/www/server/php/74/bin/php composer.phar install

--- or ----

/www/server/php/74/bin/php -d disable_functions=''  composer.phar require php-di/php-di -W

上面就是我的解决方法,被坑了好久才找到的,如果你解决了,评论区留言告诉我!

然后,你就快乐的等待着安装完成吧!!

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值