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

 

posted @   study_php_java_C++  阅读(1473)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 全程不用写代码,我用AI程序员写了一个飞机大战
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 记一次.NET内存居高不下排查解决与启示
· DeepSeek 开源周回顾「GitHub 热点速览」
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2020-07-19 TP6生成url
2019-07-19 190719有个织梦专题标题长度限制问题
2019-07-19 判断手机浏览器还是微信浏览器(PHP)
2019-07-19 TP5关联模型出现疑问,待解决
2018-07-19 php 两个值进行比较的问题
点击右上角即可分享
微信分享提示