Control Web Panel

WebPanel => CentOS-WebPanel Bugs => Topic started by: Netino on October 30, 2026, 02:31:07 AM

Title: [HOWTO] Fix PHP Warning: Unable to load dynamic library 'intl' / libicuio.so.74
Post by: Netino on October 30, 2026, 02:31:07 AM
Hello everyone,

There are some very good suggestions on how to resolve this issue. However, I would like to offer the option of using a repository such as Remi, which is highly useful and provides regular updates for all currently active and supported versions of PHP.

If your system have the following message, you have the problem:
# /usr/local/cwp/php71/bin/php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl (/usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl: cannot open shared object file: No such file or directory), /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl.so (/usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.3.36 (cli) (built: Oct 22 2026 14:30:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.36, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v15.5.1, Copyright (c) 2002-2026, by ionCube Ltd.

If you are running modern PHP versions (like PHP 8.x) on CWP and facing issues with the intl extension due to missing or outdated libicu system dependencies, here is a step-by-step guide to fix it safely without breaking your server's core repositories.

HOWTO: Install Remi Repository, PHP intl Extension, and Update libicu on AlmaLinux / CWP

This guide describes how to configure the Remi repository, extract the intl module into custom paths (such as CentOS Web Panel - CWP), and resolve libicu shared library dependency errors.
Note: Remember to change the path /usr/local/cwp/php71/ to match the actual PHP version path you are troubleshooting on your server.

Step 1: Install EPEL and Remi Repositories

The Remi repository provides the latest PHP versions and extensions. It requires the EPEL repository to be active on the system.
For AlmaLinux 8:
dnf install epel-release -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm -y
dnf makecache

For AlmaLinux 9:
dnf install epel-release -y
dnf install https://rpms.remirepo.net/enterprise/remi-release-9.rpm -y
dnf makecache

Step 2: Download and Extract the intl Extension Manually

Since CWP uses custom directory structures, downloading and extracting the .so file directly from the RPM package is the safest approach to prevent system conflicts.
# 1. Create and access a temporary folder
mkdir /tmp/php-extract && cd /tmp/php-extract

# 2. Download the package matching your PHP version (Example for PHP 8.3)
dnf download php83-php-intl

# 3. Extract the RPM package files without installing them system-wide
rpm2cpio php83-php-intl-*.rpm | cpio -idmv

# 4. Locate the extracted intl.so file
find . -name "intl.so"

# 5. Copy the intl.so file to your custom PHP extensions folder
# (Adjust the destination path according to your CWP PHP version)
cp ./usr/lib64/php/modules/intl.so /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/

Your system might also return the following error message (if you check):
# /usr/local/cwp/php71/bin/php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl (/usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl: cannot open shared object file: No such file or directory), /usr/local/cwp/php71/lib/php/extensions/no-debug-non-zts-20230831/intl.so (libicuio.so.74: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 8.3.36 (cli) (built: Oct 22 2026 14:30:10) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.36, Copyright (c) Zend Technologies
    with the ionCube PHP Loader v15.5.1, Copyright (c) 2002-2026, by ionCube Ltd.

Step 3: Resolve libicu Dependencies (Example: Version 74)

If you run php -v and get an error stating that libicuio.so.74 is missing, you must download and inject the correct shared libraries directly from Remi's mirror.
cd /tmp/php-extract

# 1. Download the libicu74 package corresponding to your OS (Example for Enterprise Linux 8)
wget https://rpms.remirepo.net/enterprise/8/remi/x86_64/libicu74-74.2-1.el8.remi.x86_64.rpm

# or (for Enterprise Linux 9)
wget https://rpms.remirepo.net/enterprise/9/remi/x86_64/libicu74-74.2-1.el9.remi.x86_64.rpm

# 2. Extract the libicu package content
rpm2cpio libicu74-*.rpm | cpio -idmv

# 3. Copy all version 74 dependencies to the system libraries folder
cp -a ./usr/lib64/libicuio.so.74* /usr/lib64/
cp -a ./usr/lib64/libicui18n.so.74* /usr/lib64/
cp -a ./usr/lib64/libicuuc.so.74* /usr/lib64/
cp -a ./usr/lib64/libicudata.so.74* /usr/lib64/

# 4. Update the operating system's dynamic linker run-time bindings cache
ldconfig


Step 4: Fix Duplicate Module Errors ("Module already loaded")

If the error message changes to Module "intl" is already loaded, it means the module is being dynamically loaded by .ini files while the main PHP binary already compiles it statically.
# 1. Locate where the duplicate extension is being called
grep -ri "intl" /usr/local/cwp/php71/php.ini /usr/local/cwp/php71/php.d/

# 2. Move redundant configuration files out of the php.d/ folder into /tmp/ (PHP's CWP uses embedded intl)
mv /usr/local/cwp/php71/php.d/intl.ini /tmp/
mv /usr/local/cwp/php71/php.d/intl.ini.disabled /tmp/

Step 5: Validation and Web Services Restart

Validate that the PHP command-line interface runs clean, then restart your web server components to apply changes to your hosted websites.
# 1. Test the PHP binary (It should return the version without any warnings)
/usr/local/cwp/php71/bin/php -v

# 2. Restart PHP-FPM to flush the server's RAM cache
systemctl restart cwp-phpfpm cwpsrv-phpfpm

For cleaning:
# cd
# rm -fr /tmp/php-extract

Regards,
Netino
Title: Re: [HOWTO] Fix PHP Warning: Unable to load dynamic library 'intl' / libicuio.so.74
Post by: overseer on October 30, 2026, 02:55:48 AM
Regards indeed! Thanks again, Netino!