环境
contos 7 Composer version 2.1.14
问题
bash-4.2$ composer install
Installing dependencies from lock file (including require-dev)
Verifying lock file contents can be installed on current platform.
Your lock file does not contain a compatible set of packages. Please run composer update.
Problem 1
- topthink/think-installer is locked to version v1.0.11 and an update of this package was not requested.
- topthink/think-installer v1.0.11 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
Problem 2
- topthink/think-installer v1.0.11 requires composer-plugin-api ^1.0 -> found composer-plugin-api[2.1.0] but it does not match the constraint.
- topthink/think-testing v1.0.6 requires topthink/think-installer ~1.0 -> satisfiable by topthink/think-installer[v1.0.11].
- topthink/think-testing is locked to version v1.0.6 and an update of this package was not requested.
解决方法
当你遇到这个问题的时候,你要考虑你用的composer.phar版本问题 composer太高了,改成1.0.22版本
composer下载链接: https://getcomposer.org/download/
不要用最新版本,因为上面提示要1.版本所以,2.版本完全不能使用
安装composer
下载后 cp composer.phar /usr/local/bin/composer
查看版本 composer -V
Composer version 1.10.22 2021-04-27 13:10:45
|