解决composer install遇到:Your requirements could not be resolved to an installable set of packages

时间:2024-03-14 08:35:54

荆轲刺秦王

首先看报错信息,如图:

解决composer install遇到:Your requirements could not be resolved to an installable set of packages

分析:如果出现 Your requirements could not be resolved to an installable set of packages.代码是由版本不对造成的, 首先要检查版本格式是否写正确。另一个就是php版本有问题。

首先在此目录下:composer -v      和   php -v  如果两者都没问题那么就可以按照下一步的解决方法来了。

解决办法:直接忽略版本就是了

composer install --ignore-platform-reqs 或者 composer update --ignore-platform-reqs

结果如下图:

解决composer install遇到:Your requirements could not be resolved to an installable set of packages

至此,完美解决问题。