在使用laravel安装一个插件时,提示如下错误:
[root@bogon api]# composer require yansongda/pay Do not run Composer as root/ super user! See https://getcomposer.org/root for details Using version ^2.6 for yansongda/pay ./composer.json&nbs p;has been updated Loading composer repositories with package information Updating dependencies (including&n bsp;require-dev) Your requirements could not be resolved to an installable set of packages. &nb sp;Problem 1 - Conclusion: don't install yansongda/pay v2.6.1 - Co nclusion: don't install yansongda/pay v2.6.0 - Conclusion: don't install yansongda/pay v2.6.0-beta.3 - Conclusion: don't install yansongda/pay v2.6.0-beta.2 -&n bsp;Conclusion: don't install yansongda/pay v2.6.0-beta.1 - Conclusion: remove monolog/monolog 1.22.1 - Installation request for yansongda/pay ^2.6 -> satisfiable by yansongda/ pay[v2.6.0, v2.6.0-beta, v2.6.0-beta.1, v2.6.0-beta.2, v2.6.0-beta.3, v2.6.1]. - Conclusion: don't i nstall monolog/monolog 1.22.1 - yansongda/pay v2.6.0-beta requires monolog/monolog ^1.23 - > satisfiable by monolog/monolog[1.23.0, 1.24.0, 1.x-dev]. - Can only install one o f: monolog/monolog[1.23.0, 1.22.1]. - Can only install one of: monolog/monolog[1.24.0, 1.22 .1]. - Can only install one of: monolog/monolog[1.x-dev, 1.22.1]. - I nstallation request for monolog/monolog (locked at 1.22.1) -> satisfiable by monolog/monolog[1.22.1]. Install ation failed, reverting ./composer.json to its original content.
看提示一大堆,啰里啰嗦,关键点只有一处,那就是Conclusion: remove monolog/monolog 1.22.1,也就是需要移除现有的monolog版本,赶紧去composer看了一下,发现插件还在,说明卸载出现了问题,这个时候只有手工进行删除了。
[root@bogon api]# composer remove monolog/monolog Do not run Composer as r oot/super user! See https://getcomposer.org/root for details monolog/monolog is not required in your co mposer.json and has not been removed Loading composer repositories with package information Updating& nbsp;dependencies (including require-dev) Package operations: 0 installs, 2 updates, 0 removals -&nb sp;Updating psr/log (1.0.2 => 1.1.0): Loading from cache - Updating monolog/monolog (1.22.1& nbsp;=> 1.24.0): Loading from cache Package phpoffice/phpexcel is abandoned, you should avoid using it. Use phpoffice/phpspreadsheet instead. Writing lock file Generating autoload files
再重新安装插件试试看
:
[root@bogon api]# composer require yansongda/pay Do not run Composer as root/ super user! See https://getcomposer.org/root for details Using version ^2.6 for yansongda/pay ./composer.json&nbs p;has been updated Loading composer repositories with package information Updating dependencies (including&n bsp;require-dev) Package operations: 2 installs, 0 updates, 0 removals - Installing yansongda/supports (v1.8.5): Downloading (100%) - Installing yansongda/pay (v2. 6.1): Downloading (100%) Package phpoffice/phpexcel is abandoned, you& nbsp;should avoid using it. Use phpoffice/phpspreadsheet instead. Writing lock file Generating autoload files
成功安装,大功告成~
评论前必须登录!
注册