Drupal - 错误安装模块“实体”
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Drupal - 错误安装模块“实体”相关的知识,希望对你有一定的参考价值。
我在Docker容器中安装了Drupal,安装了Composer和Drush。我想安装Entity-API模块(https://www.drupal.org/project/entity),我开始:composer require drupal/entity
这给了我一个错误:
Using version ^0.1.0 for drupal/entity
./composer.json has been updated
> DrupalProjectcomposerScriptHandler::checkComposerVersion
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Can only install one of: drupal/core[8.5.6, 8.0.x-dev].
- Can only install one of: drupal/core[8.0.x-dev, 8.5.6].
- Can only install one of: drupal/core[8.0.x-dev, 8.5.6].
- drupal/entity 0.1.0 requires drupal/core <8.1.0 -> satisfiable by drupal/core[8.0.x-dev].
- Installation request for drupal/entity ^0.1.0 -> satisfiable by drupal/entity[0.1.0].
- Installation request for drupal/core (locked at 8.5.6, required as ~8.5.3) -> satisfiable by drupal/core[8.5.6].
Installation failed, reverting ./composer.json to its original content.
我的Drupal版本是8.5.6,我使用的是从https://getcomposer.org/installer安装的最新版Composer
如何使用Composer安装此程序? TX
答案
使用--update-with-all-dependencies
开关:
composer require drupal/entity --update-with-all-dependencies
--update-with-all-dependencies
:还更新新所需的包的依赖关系,包括那些根要求的包。
以上是关于Drupal - 错误安装模块“实体”的主要内容,如果未能解决你的问题,请参考以下文章