Error while installing php.intl
Linode
Linode Staff
I keep getting the following error when trying to install php.intl on my Linode :
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
downloading intl-3.0.0.tgz ...
Starting to download intl-3.0.0.tgz (248,200 bytes)
....................................................done: 248,200 bytes
150 source files, building
running: phpize
Configuring for:
PHP Api Version: 20180731
Zend Module Api No: 20180731
Zend Extension Api No: 320180731
Specify where ICU libraries and headers can be found [DEFAULT] : building in /root/tmp/pear/pear-build-root1MMwHl/intl-3.0.0
running: /root/tmp/pear/intl/configure --with-php-config=/opt/cpanel/ea-php73/root/usr/bin/php-config --with-icu-dir=DEFAULT
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for PHP prefix... /opt/cpanel/ea-php73/root/usr
checking for PHP includes... -I/opt/cpanel/ea-php73/root/usr/include/php -I/opt/cpanel/ea-php73/root/usr/include/php/main -I/opt/cpanel/ea-php73/root/usr/include/php/TSRM -I/opt/cpanel/ea-php73/root/usr/include/php/Zend -I/opt/cpanel/ea-php73/root/usr/include/php/ext -I/opt/cpanel/ea-php73/root/usr/include/php/ext/date/lib
checking for PHP extension directory... /opt/cpanel/ea-php73/root/usr/lib64/php/modules
checking for PHP installed headers prefix... /opt/cpanel/ea-php73/root/usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable internationalization support... yes, shared
checking for location of ICU headers and libraries... checking for pkg-config... /bin/pkg-config
checking for icu-config... no
not found
configure: error: Unable to detect ICU prefix or no failed. Please verify ICU install prefix and make sure icu-config works.
ERROR: `/root/tmp/pear/intl/configure --with-php-config=/opt/cpanel/ea-php73/root/usr/bin/php-config --with-icu-dir=DEFAULT' failed
Any guidance would be greatly appreciated.
1 Reply
php-intl is dependent on libicu-dev (which includes headers required to compile/build libicu). The install of php-intl failed because you didn't install that dependency first.
You should just use apt-get(1):
sudo apt-get install php-intl
If you need any dependencies (like libicu), apt-get(1) will install them for you (correctly).
I'm assuming you're using Debian or Ubuntu here. Substitute the appropriate package manager for your distro (yum, zypp, etc).
FWIW, installing stuff from/with pecl is generally asking for aggravation.
--sw