composer安装thinkphp总是报错

安装fastadmin/tp5的管理后台,但我通过composer更新或安装时,总是提示我错误:composer的安装版本过高导致问题

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - topthink/think-installer[v1.0.0, ..., v1.0.12] require composer-plugin-api ^1.0 -> found composer-plugin-api[2.0.0] but it does not match the constraint.
    - topthink/framework v5.0.24 requires topthink/think-installer ~1.0 -> satisfiable by topthink/think-installer[v1.0.0, ..., v1.0.12].
    - Root composer.json requires topthink/framework ~5.0.24 -> satisfiable by topthink/framework[v5.0.24].

You are using a snapshot build of Composer 2, which some of your plugins seem to be incompatible with. Make sure you update your plugins or report an issue to them to ask them to support Composer 2. To work around this you can run Composer with --ignore-platform-req=composer-plugin-api, but this may result in broken plugins and bigger problems down the line.

我的composer是通过以下方式安装的

php -r "copy('https://install.phpcomposer.com/installer', 'composer-setup.php');"
php composer-setup.php

解决方法: 使用阿里云的源,并对composer进行升级

composer config -g repo.packagist composer https://mirrors.aliyun.com/composer/
composer selfupdate

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值