Php intl unable to load

I’m using php version 7.4.4, I already installed php-intl version 7.4.4 but I’m getting this error:

PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (libicuio.so.65: cannot open shared object file: No such file or directory)) in Unknown on line 0

Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (libicuio.so.65: cannot open shared object file: No such file or directory)) in Unknown on line 0

Hi @Chronos,

Did you install it VIA pamac?

$ pamac search php-intl

php-intl
8.0.2-1  extra
intl module for PHP

Because it is in the extra repos, as you can see.

Or did you use some other way?

The module was accidentally updated to v8, the error started showing so I downgraded it by:

# downgrade php-intl 

Then chose php-intl 7.4.4

But the error is still there.

Interesting. Try and remove the module:

$ pacman -R php-intl

when done, reinstall it.

$ pacman -S php-intl

To make sure you’re running PHP 7.x, run php --version:

$ php --version
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/lib/php/20190902/curl.so (/usr/lib/php/20190902/curl.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/curl.so.so (/usr/lib/php/20190902/curl.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'mbstring.so' (tried: /usr/lib/php/20190902/mbstring.so (/usr/lib/php/20190902/mbstring.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/mbstring.so.so (/usr/lib/php/20190902/mbstring.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'wddx.so' (tried: /usr/lib/php/20190902/wddx.so (/usr/lib/php/20190902/wddx.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/wddx.so.so (/usr/lib/php/20190902/wddx.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/lib/php/20190902/zip.so (/usr/lib/php/20190902/zip.so: cannot open shared object file: No such file or directory), /usr/lib/php/20190902/zip.so.so (/usr/lib/php/20190902/zip.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
PHP 7.4.7 (cli) (built: Jun 12 2020 07:43:48) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.7, Copyright (c), by Zend Technologies

(Yeah, my PHP is kind of messed up, I know. Haven’t really used it in quite some time.)

Done it, still the same.

PHP Warning:  PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (/usr/lib/php/modules/intl.so: undefined symbol: zend_argument_type_error)) in Unknown on line 0

Here is the version:

Warning: PHP Startup: Unable to load dynamic library 'intl' (tried: /usr/lib/php/modules/intl (/usr/lib/php/modules/intl: cannot open shared object file: No such file or directory), /usr/lib/php/modules/intl.so (/usr/lib/php/modules/intl.so: undefined symbol: zend_argument_type_error)) in Unknown on line 0
PHP 7.4.4 (cli) (built: Mar 18 2020 04:33:54) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies

What is you output for

$ locate intl | grep -i php

Edit:

And while you’re at it, please give:

$ stat /usr/lib/php/modules/intl.so

PHP has been updated to 8.
If you want to use 7, install php7*.

/usr/lib/php/modules/intl.so
  File: /usr/lib/php/modules/intl.so
  Size: 481248          Blocks: 944        IO Block: 4096   regular file
Device: 807h/2055d      Inode: 281613      Links: 1
Access: (0755/-rwxr-xr-x)  Uid: (    0/    root)   Gid: (    0/   /root)
Access: 2021-02-18 20:22:26.000000000 +0800
Modify: 2020-03-18 12:33:54.000000000 +0800
Change: 2021-02-18 20:22:26.273115071 +0800
 Birth: 2021-02-18 20:22:26.263115071 +0800

Well, it might have been inadvertently, but I’m guessing that’s your problem, right there.

I’m suggesting your remove PHP completely. And than reinstall php7 if you want to continue using PHP 7.

ICU has not been version 65 for a while now. So your old php install is out of date in many ways.

I suggest you update it all. And if you need php 7 specifically, use php7 packages from the repo, instead of php.

Do I need remove php before installing php7?

That’d be my recommendation. Especially seeing as you now have multiple versions’ files on your system.

1 Like