Question

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

Was it helpful?

Solution

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

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

OTHER TIPS

Try this to enable php-curl

sudo apt-get install php7.0-curl

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.

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.

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
Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top