简体   繁体   中英

Conflict when installing PHP intl extension for composer on Centos 7

I am trying to do a Magento 2 DRC installation on a remote linux server, running Centos 7, Apache 2.4.6, MariaDB and PHP v5.6.9. When I try to install Composer I get the following message:

$ cd /var/www/html/magento2 && composer install
Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - The requested PHP extension ext-intl * is missing from your system.

I have installed ext-intl using:

yum list php*intl

and

yum install php-intl

But is still gives me the same message.

I have tried various other installations to get around the problem, to no avail. Any suggestions would be gratefully erceived as it is stalling the project.

Would it help to downgrade to PHP 5.5?

You can follow the below steps for magento2 installation on Centos 7. http://gotechnies.com/install-magento2-centos-7/

There are few easy steps to install Magento 2(M2) on Centos Distro.

Step 1-: First of all we need to add few EPEL repositories for the php5.6, mysql-server5.6, and phpmyadmin.

# EPEL Repository for php5.6
        $ rpm -iUvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
        $ rpm -iUvh https://mirror.webtatic.com/yum/el7/webtatic-release.rpm
        # EPEL Repository for mysql-server5.6
        $rpm -iUvh http://repo.mysql.com/mysql-community-release-el7-5.noarch.rpm
        # EPEL Repository for phpMyadmin on Centos 7
        $ rpm -iUvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
        $ yum -y update

Step 2-:

Install Require packages like apache, php5.6, mysql-server, phpmyadmin.

$ yum install-y httpd php mysql-server phpmyadmin php56w-mcrypt php56w-intl php56w-xsl git

To allow the phpmyadmin in apache 2.4 add the line

Require all granted

Readmore go to above link

Magento2 installation on RHEL/Centos 7 with Php7.

Subscribing to the IUS Community Project Repository Since PHP 7.x is not yet packaged in official repositories for the major distributions, we'll have to rely on a third-party source. Several repositories offer PHP 7 RPM files. We'll use the IUS repository.

IUS offers an installation script for subscribing to their repository and importing associated GPG keys. Make sure you're in your home directory, and retrieve the script using curl:

curl 'https://setup.ius.io/' -o setup-ius.sh
sudo bash setup-ius.sh

Install Required Packages-:

sudo yum install -y mod_php70u php70u-cli php70u-mysqlnd php70u-json php70u-gd php70u-dom php70u-simplexml php70u-mcrypt php70u-intl httpd mysql-server git

See my Article for Complete Installation magento2-php7-centos7-mysql5.7

The extension has to be installed and activated for the command line PHP, not only for the web server PHP. If you run php -i , which is the CLI equivalent of running phpinfo() , you should see a section containing info about the "intl" extension. If this is missing, you'd also see the path to the "php.ini" file that is being used - this is where you should double check whether or not the extension is activated or not.

Most of the time, it is not.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM