1

I am trying to install magento/product-community-edition 2.1.3 in cloud9 (Ubuntu 14.04.3 LTS) with PHP 7.0.15

I get the following error:

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for magento/product-community-edition 2.1.3 -> satisfiable by magento/product-community-edition[2.1.3].
    - magento/product-community-edition 2.1.3 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:
    - /home/ubuntu/.phpbrew/php/php-7.0.15/etc/php.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

I tried to do the following installation on install php70-gd on ubuntu but I still get the same error afterwards.

How will I successfully install magento 2?

Community
  • 1
  • 1
xanderlopez
  • 617
  • 2
  • 8
  • 14

2 Answers2

1

Use following command to install the gd extension:

sudo apt-get install php5.6-gd

it will work for PHP version 5.6

If you are using any other verison of PHP, replace 5.6 by that like:

sudo apt-get install php7.0-gd

for PHP 7.0

Manish Joy
  • 476
  • 3
  • 17
  • you can find PHP version by running this command in ssh/terminal: **php -v** – Manish Joy Feb 01 '17 at 12:07
  • I've already installed php gd and still get the same error `sudo apt-get install php7.0-gd Reading package lists... Done Building dependency tree Reading state information... Done php7.0-gd is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 166 not upgraded.` – xanderlopez Feb 02 '17 at 01:27
  • Then, check if in your php.ini file has the following line: **;extension=php_gd2.dll** if exists, change it to **extension=php_gd2.dll** and restart apache – Manish Joy Feb 02 '17 at 06:17
0

run

sudo apt-get install php5.6-gd

or

sudo apt-get install phpX.X-gd

then check your .ini files:

To enable extensions, verify that they are enabled in your .ini files: - /etc/php/7.0/cli/php.ini

change

;extension=...

to extension=... for each dependency you need.

If the error is still there, check the PHP version on your localhost/server and the PHP version that you are using with your Magento.

Be aware that all versions of PHP are not compatible to Magento.

More informations: http://devdocs.magento.com/guides/v2.0/comp-mgr/trouble/cman/php-version.html

Good luck!

PS: If you got the same issue for ext-mcrypt, ext-dom or anything else, you will have to follow the same process and then re-run the composer installation.

sudo apt-get install php7.0-dom

sudo apt-get install php7.0-mcrypt

sudo apt-get install php7.0-curl

Kevin Sabbe
  • 1,412
  • 16
  • 24