要启用扩展,请验证是否在这些.ini文件中启用了它们 - Vagrant/Ubuntu/Magento 2.0.2

2022-08-30 10:56:35

当通过作曲家安装Magento 2.0.2时,收到以下错误:

Problem 1
 - Installation request for magento/product-enterprise-edition 2.0.2 -> satisfiable by magento/product-enterprise-edition[2.0.2].
 - magento/product-enterprise-edition 2.0.2 requires ext-gd * -> the requested PHP extension gd is missing from your system.

To enable extensions, verify that they are enabled in those .ini files:

- /etc/php5/cli/php.ini
- /etc/php5/cli/conf.d/05-opcache.ini
- /etc/php5/cli/conf.d/10-pdo.ini
- /etc/php5/cli/conf.d/20-curl.ini
- /etc/php5/cli/conf.d/20-imap.ini
- /etc/php5/cli/conf.d/20-json.ini
- /etc/php5/cli/conf.d/20-mcrypt.ini
- /etc/php5/cli/conf.d/20-pdo_pgsql.ini
- /etc/php5/cli/conf.d/20-pgsql.ini
- /etc/php5/cli/conf.d/20-pspell.ini
- /etc/php5/cli/conf.d/20-readline.ini

You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

我已经安装了php5-cli,php5-curl。


答案 1

首先安装,然后和最后一个是。之后,它将按预期进行安装。sudo apt-get install php5-gdsudo apt-get install php5-intlsudo apt-get install php5-xsl


答案 2

这解决了我的问题

sudo apt-get install php7.1-xml

或更新的版本 (* = 您的 php 版本)

sudo apt-get install php7.*-xml

推荐