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
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 全程不用写代码,我用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 两个值进行比较的问题