Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't get to install 'intl' extension for php on debian

Tags:

I have a Debian server and I want to install the intl extension through pecl.

During the installation it asks me:

"Specify where ICU libraries and headers can be found [DEFAULT] :"

Here I've been trying several options, including leaving it empty to use DEFAULT, but I get the following error:

configure: error: C++ preprocessor "/lib/cpp" fails sanity check See 'config.log' for more details. ERROR: '/tmp/pear/temp/intl/configure --with-icu-dir=DEFAULT' failed

I've installed php5.3 with: make && make install. I have already installed icu, but unlike php5.3, it was installed with apt-get (i don't know if this is important).

Any idea?

like image 588
matubaum Avatar asked Jul 18 '11 00:07

matubaum


People also ask

How do I enable PHP extensions in Linux?

Use phpenmod command followed by module name to enable specific PHP module on your system. In the below example, the first command is an example and the second command will enable mbstring module for all installed PHP versions and all SAPI. You can also define the PHP version using -v switch to enable specific modules.


1 Answers

On Ubuntu 12.04 LTS, the following worked for me:

sudo apt-get install php5-intl sudo /etc/init.d/apache2 restart 

Bam, warning gone! Hope this helps somebody in the future :)

like image 132
JMK Avatar answered Sep 24 '22 18:09

JMK