在尝试使用Composer安装Drush时,我得到了一个有关合并/注释-命令的错误。“锁定在2.0.3”和“要求2.8.1”是什么意思?
这是一个错误:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Installation request for drush/drush dev-master -> satisfiable by drush/drush[dev-master].
- Conclusion: remove consolidation/annotated-command 2.0.3
- Conclusion: don't install consolidation/annotated-command 2.0.3
- drush/drush dev-master requires consolidation/annotated-command ^2.8.1 -> satisfiable by consolidation/annotated-command[2.8.1, 2.8.2].
- Can only install one of: consolidation/annotated-command[2.8.1, 2.0.3].
- Can only install one of: consolidation/annotated-command[2.8.2, 2.0.3].
- Installation request for consolidation/annotated-command (locked at 2.0.3) -> satisfiable by consolidation/annotated-command[2.0.3].
Installation failed, reverting ./composer.json to its original content.发布于 2019-01-15 11:58:26
在我的composer.json中将drush/drush的最小版本更改为D1,然后运行composer update drush/drush之后,我会得到这个错误。
我只是通过执行composer require drush/drush:~9.0来解决这个问题,这导致了错误消息drush/drush 9.5.x-dev requires symfony/config ^3.4,所以在composer require drush/drush:~9.0能够成功完成之前,我必须执行composer require symfony/config:^3.4。
不知道这是否是解决这种依赖冲突的唯一方法或最佳实践,但简而言之,这对我是有效的:
composer require symfony/config:^3.4composer require drush/drush:~9.0https://drupal.stackexchange.com/questions/255393
复制相似问题