Error build PHP 7.4

bibiugly

Verified User
Joined
Apr 9, 2019
Messages
75
Location
Vietnam
When I build PHP7.4 I have a problem, pls help me.
Code:
checking whether to enable internationalization support... yes
checking for icu-uc >= 50.1 icu-io icu-i18n... no
configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:

Requested 'icu-uc >= 50.1' but version of icu-uc is 4.8.1.1

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.

Alternatively, you may set the environment variables ICU_CFLAGS
and ICU_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

*** There was an error while trying to configure php. Check the configure file
 
Try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n
 
Try:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n

configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:
Requested 'icu-uc >= 50.1' but version of icu-uc is 4.8.1.1


I had the same problem as you
I tried several times as ad, but I still couldn't build php 7.4
 
May you PM me or create a ticket? I’d check it directly on the server.
 
got the same problem.

configure: error: Package requirements (icu-uc >= 50.1 icu-io icu-i18n) were not met:

Requested 'icu-uc >= 50.1' but version of icu-uc is 4.8.1.1

What to do
 
Do you have /usr/local/icu/include/unicode/uvernum.h on your system? If yes, "./build versions" should list an update available :)

To update ICU you may also do:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build icu

Or just click "Build" for ICU in CustomBuild plugin.
 
Thank you. This worked for me as well.

Code:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build php n
 
On my CentOS 6.10 machines the PHP 7.4 install script still linked the wrong ICU version. I had to symlink the standard libici*.so's to the ones that were built by Directadmin.

Code:
ln -sf /usr/local/icu/lib/libicudata.so /usr/lib64/libicudata.so
ln -sf /usr/local/icu/lib/libicui18n.so /usr/lib64/libicui18n.so
ln -sf /usr/local/icu/lib/libicuio.so /usr/lib64/libicuio.so
ln -sf /usr/local/icu/lib/libicuuc.so /usr/lib64/libicuuc.so
 
Last edited:
if you have at least one 5.x php installed - DA will use old ICU for all.
 
On my CentOS 6.10 machines the PHP 7.4 install script still linked the wrong ICU version. I had to link the standard libici*.so's to the ones that were built by Directadmin.

Code:
ln -sf /usr/local/icu/lib/libicudata.so /usr/lib64/libicudata.so
ln -sf /usr/local/icu/lib/libicui18n.so /usr/lib64/libicui18n.so
ln -sf /usr/local/icu/lib/libicuio.so /usr/lib64/libicuio.so
ln -sf /usr/local/icu/lib/libicuuc.so /usr/lib64/libicuuc.so
you can custom ICU complier with something like this with custom php complier in " custom/fpm/configure.php74 "
Code:
"--with-icu-dir=/usr/local/icu"
 
you can custom ICU complier with something like this with custom php complier in " custom/fpm/configure.php74 "
Code:
"--with-icu-dir=/usr/local/icu"
--with-icu-dir is not a supported compiler option in PHP 7.4 anymore: https://github.com/php/php-src/blob/PHP-7.4/UPGRADING#L775

If you build php intl with PHP 7.4 it will take the default ICU libs, which are on my system in /usr/lib64 (version 42.1). By symlinking the libicuuc.so to /usr/local/icu/lib/libicuuc.so etc I could build PHP 7.4 with ICU 58.2
 
Do you have /usr/local/icu/include/unicode/uvernum.h on your system? If yes, "./build versions" should list an update available :)

To update ICU you may also do:
Code:
cd /usr/local/directadmin/custombuild
./build update
./build icu

Or just click "Build" for ICU in CustomBuild plugin.

thank you.
 
Back
Top