12

I am trying to setup a new vagrant box for Magento 2 development, however when running composer install, I receive the following errors:

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-mcrypt * is missing from your system. Install or enable PHP's mcrypt extension.
  Problem 3
    - The requested PHP extension ext-curl * is missing from your system. Install or enable PHP's curl extension.
  Problem 4
    - The requested PHP extension ext-intl * is missing from your system. Install or enable PHP's intl extension.
  Problem 5
    - The requested PHP extension ext-xsl * is missing from your system. Install or enable PHP's xsl extension.
  Problem 6
    - The requested PHP extension ext-mbstring * is missing from your system. Install or enable PHP's mbstring extension.
  Problem 7
    - The requested PHP extension ext-openssl * is missing from your system. Install or enable PHP's openssl extension.
  Problem 8
    - The requested PHP extension ext-zip * is missing from your system. Install or enable PHP's zip extension.

I have already tried installing each of these extensions using sudo apt-get install php7.0-mcrypt etc, however I am still getting the errors above stating that the extensions I have installed are still missing. I have restarted Apache2. Any ideas?

PHP -v

PHP 7.0.8 (cli) (built: Jun 26 2016 15:14:18) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies

enter image description here

4
  • After installing did you restart php-fpm/apache/nginx. Secondly are you sure that "web" is using PHP 7, make a <?php phpinfo(); page to check and confirm whats what Jun 28, 2016 at 21:04
  • @BarryCarlyon Updated question with a screenshot - let me know if you need more info. How do I ensure that "web" is using PHP7?
    – wickywills
    Jun 28, 2016 at 21:18
  • can you run php -m and see what list of installed extension you get as an output. Jun 28, 2016 at 21:27
  • I can't see anything "wrong" so not sure why Magento is claiming the modules are not installed. PHPinfo gave the correct output, confirming it's on php7 and has those modules installed. Jun 28, 2016 at 22:13

5 Answers 5

29

Before you install Magento 2, make sure your system meets or exceeds the following requirements:

Required PHP extensions:

  • PDO/MySQL
  • mbstring
  • mcrypt
  • mhash
  • simplexml
  • curl
  • gd2, ImageMagick 6.3.7 (or later) or both
  • soap

But for php 7.0 you must use next commands:

sudo apt-get update

sudo apt-get install php7.0-gd php7.0-mcrypt php7.0-curl php7.0-intl php7.0-xsl php7.0-mbstring php7.0-openssl php7.0-zip php7.0-soap php7.0-bcmath

sudo service apache2 restart

NOTE:

Use this for openSUSE:

zypper install php7-gd php7-mcrypt php7-curl php7-intl php7-xsl php7-mbstring php7-openssl php7-zip php7-soap
4
  • 1
    sudo apt-get install php7.0-soap also
    – Thaha kp
    Oct 11, 2017 at 6:41
  • Thank's. Added. Oct 11, 2017 at 6:58
  • Anyone here with same problem on windows-7 Xampp? I dont have any dll Mar 1, 2018 at 6:42
  • Also, sudo apt install php7.0-bcmath Jan 16, 2020 at 13:33
2

Try this to enable php-curl

sudo apt-get install php7.0-curl
1

use below command for php requirement in magento2,

here I am using php{7.3} make changes as per your required php version => php{version}

sudo apt-get update

sudo apt-get install php7.3-gd php7.3-curl php7.3-intl php7.3-xsl php7.3-zip php7.3-soap php7.3-mbstring php7.3-mysql php7.3-bcmath php7.3-mcrypt

sudo systemctl restart php7.3-fpm.service

sudo service nginx restart
0

Sometimes the command line is set up to use a different configuration (.ini file) from other sources. You ran phpinfo from the web and say it looks fine, but how about from the command line itself?

Specifically, look at the output of php -i | grep '.ini' (to see loaded ini files), and php -i in general (to see loaded extensions).

Best guess, CLI is loading php-cli.ini or such, and that alternate config was not updated with the new extensions you installed. Copy those in from php.ini, and your problem is be resolved.

-1

I am using centos CWP webpanel. Its a GUI similar to others that you have to purchase or rent. In CentosCWP dashboard, there is a php selector that allows you run a dozen different php versions to fit your needs. When I select a version, there are check boxes to allow you customize the modules that load. By default intl is not checked. Once I checked and saved the php configuration and rebooted apache, the readiness error for missing "intl" module disappeared.

But apart from that, I scrapped Mage 2.1 and went back to ZC. Mage is way to slow and the new backend is poorly designed in my humble opinion.

1
  • 1
    This does not provide an answer. Please give specific steps to solving the issue. Apr 20, 2017 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.