【问题标题】:Drupal - error installing module "entity"Drupal - 安装模块“实体”时出错
【发布时间】:2018-09-05 17:46:26
【问题描述】:

我在 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
> DrupalProject\composer\ScriptHandler::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,我使用的是最新版本的 Composer,从 https://getcomposer.org/installer 安装

如何使用 Composer 安装它?发送

【问题讨论】:

    标签: drupal composer-php drupal-modules drupal-8


    【解决方案1】:

    使用--update-with-all-dependencies开关:

    composer require drupal/entity --update-with-all-dependencies
    
    • --update-with-all-dependencies:同时更新新需要的包的依赖关系,包括那些根需求。

    https://getcomposer.org/doc/03-cli.md#require

    【讨论】:

      猜你喜欢
      • 2012-12-01
      • 2011-06-06
      • 2015-07-16
      • 2017-06-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多