Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install PHP intl extension on CentOS?

I know virtually nothing about installing packages. I managed to install Zend Framework 1 with yum a while back by following a very specific tutorial.

Now I need the PHP intl extension and I can't figure out how to install it.

I did

yum list php*intl 

and saw that there was one available. So I did

yum install php-intl 

and got the following error message:

Error: Package: php-intl-5.3.3-14.el6_3.x86_64 (updates)        Requires: php-common = 5.3.3-14.el6_3        Installed: php-common-5.3.17-2.el6.remi.x86_64 (@remi)            php-common = 5.3.17-2.el6.remi        Available: php-common-5.3.3-3.el6_2.8.x86_64 (base)            php-common = 5.3.3-3.el6_2.8        Available: php-common-5.3.3-14.el6_3.x86_64 (updates)            php-common = 5.3.3-14.el6_3  You could try using --skip-broken to work around the problem  You could try running: rpm -Va --nofiles --nodigest 

I did not try the suggestions mentioned in the message because I didn't know what they would do and I am afraid of breaking something. This is a production machine and I don't have another machine to test on. I tried to find an rpm to download that was the same version as my PHP, but had no luck.

What do those two suggestions do and are they safe to try? What else can I try to get the intl extension installed?

like image 691
toxalot Avatar asked Feb 04 '13 03:02

toxalot


People also ask

What is PHP Intl extension?

The Internationalization extension (Intl) is a wrapper for the ICU library, a set of C/C++ and Java libraries that provide Unicode and Globalization support for software applications. It enables PHP programmers to perform UCA-conformant collation and date/time/number/currency formatting in their scripts.

Where can I download PHP extensions?

The PHP Extension Community Library (PECL) is a repository for PHP Extensions, providing a directory of all known extensions and hosting facilities for downloading and development of PHP extensions.


2 Answers

As you have php-commom from remi repositories, you need to get php-intl from remi also.

Add --enable-repo option as follows:

yum --enablerepo=remi install php-intl 
like image 80
Carlos Romero López Avatar answered Sep 30 '22 10:09

Carlos Romero López


If you have higher PHP version like 5.6, you have to enable both remi and remi-php56 repos to install all the additional dependencies:

yum --enablerepo=remi,remi-php56 install php-intl 
like image 45
Christos Lytras Avatar answered Sep 30 '22 11:09

Christos Lytras