首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装Drush时Windows Ubuntu上PHP版本的问题

安装Drush时Windows Ubuntu上PHP版本的问题
EN

Drupal用户
提问于 2022-12-17 17:21:05
回答 1查看 482关注 0票数 0

我试图用DDEV安装Drupal 10,并使用以下说明:https://ddev.readthedocs.io/en/latest/users/quickstart/#drupal。我在Windows上的(WSL2)上。Ubuntu版本: 20.04。当我试图运行命令ddev composer require drush/drush时,会出现错误。

代码语言:javascript
复制
Using version ^11.4 for drush/drush
./composer.json has been updated
Running composer update drush/drush
Loading composer repositories with package information
Updating dependencies
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - drupal/core 10.0.0 requires php >=8.1.0 -> your php version (8.0.14) does not satisfy that requirement.
    - drupal/core-recommended 10.0.0 requires drupal/core 10.0.0 -> satisfiable by drupal/core[10.0.0].
    - drupal/core-recommended is locked to version 10.0.0 and an update of this package was not requested.

You can also try re-running composer require with an explicit version constraint, e.g. "composer require drush/drush:*" to figure out if any version is installable, or "composer require drush/drush:^2.1" if you know which you need.

Installation failed, reverting ./composer.json and ./composer.lock to their original content.
composer [require drush/drush] failed, composer command failed: exit status 2. stderr=

我升级了PHP。php -v报告我安装了PHP8.2.0。

作曲家怎么能说我使用的是PHP8.0.14?

EN

回答 1

Drupal用户

回答已采纳

发布于 2022-12-17 18:21:57

您正在本地机器上执行PHP,该机器安装了PHP8.2。在VM中执行composer,VM安装了PHP8.0。您需要在VM中升级PHP。

有关在扩展和定制环境中执行此操作的说明,请参见DDev。

票数 4
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/314083

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档