当我在Magento 2目录中运行composer install -v
时,我得到了这个:
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Dependency resolution completed in 0.000 seconds
Your requirements could not be resolved to an installable set of packages.
Problem 1
- The requested PHP extension ext-gd * is missing from your system. Install or enable PHP's gd extension.
Problem 2
- The requested PHP extension ext-dom * is missing from your system. Install or enable PHP's dom extension.
Problem 3
- The requested PHP extension ext-simplexml * is missing from your system. Install or enable PHP's simplexml extension.
Problem 4
- The requested PHP extension ext-mcrypt * is missing from your system. Install or enable PHP's mcrypt extension.
Problem 5
- The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
Problem 6
- The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
Problem 7
- The requested PHP extension ext-xsl * is missing from your system. Install or enable PHP's xsl extension.
Problem 8
- The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
Problem 9
- The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension.
Problem 10
- Installation request for braintree/braintree_php 3.7.0 -> satisfiable by braintree/braintree_php[3.7.0].
- braintree/braintree_php 3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
Problem 11
- Installation request for pelago/emogrifier v0.1.1 -> satisfiable by pelago/emogrifier[v0.1.1].
- pelago/emogrifier v0.1.1 requires ext-mbstring * -> the requested PHP extension mbstring is missing from your system.
Problem 12
- Installation request for phpunit/phpunit 4.1.0 -> satisfiable by phpunit/phpunit[4.1.0].
- phpunit/phpunit 4.1.0 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 13
- Installation request for theseer/fdomdocument 1.6.1 -> satisfiable by theseer/fdomdocument[1.6.1].
- theseer/fdomdocument 1.6.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
Problem 14
- theseer/fdomdocument 1.6.1 requires ext-dom * -> the requested PHP extension dom is missing from your system.
- sebastian/phpcpd 2.0.0 requires theseer/fdomdocument ~1.4 -> satisfiable by theseer/fdomdocument[1.6.1].
- Installation request for sebastian/phpcpd 2.0.0 -> satisfiable by sebastian/phpcpd[2.0.0].
如何安装这些扩展程序?我安装了LEMP堆栈。
答案 0 :(得分:4)
您最有可能使用您的包管理器来执行此操作。 对于gd扩展,您可以运行
sudo apt-get update && sudo apt-get install php7.0-gd
可能有其他扩展可用的类似软件包。 使用apt-cache搜索,您可以搜索包。例如
apt-cache search php7.0
会找到所有与php7.0相关的软件包