composer install 报magento/product-enterprise-edition 2.0.2 requires ext-gd * -> the requested PHP ex

在linux 中 报类似的错误

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.

解决办法:
其实出现这个问题就是扩展没装的问题。
centos中解决办法:

yum list |grep php50w       或  yum search php70w    查询可供安装的包 
yum -y install php70w-xml.x86_64        安装
service php-fpm restart     重启php

重新composer install

优班图类似: 只是举例,不代表具体缺哪个包。可以根据提示自己下载对应的包

sudo apt-get install php5-gd
sudo apt-get install php5-intl

你可能感兴趣的:(php)