PHP links to old libicudata.so.48 after upgrade to Ubuntu 18.04

CrazyFrog

Verified User
Joined
Aug 28, 2019
Messages
8
Hi everybody,

I am trying to upgrade a machine from Ubuntu 16.04 to Ubuntu 18.04.

I have done the OS upgrade successfully, and am now trying a custombuild to build new daemons against the new system.

However Apache breaks when I do this. The error message is:

httpd[29732]: httpd: Syntax error on line 51 of /etc/httpd/conf/httpd.conf: Syntax error on line 3 of /etc/httpd/conf/extra/httpd-phpmodules.conf: Cannot load /usr/lib/apache/libphp7.so into server: libicudata.so.48: cannot open shared object file: No such file or directory

I verified that I am using a newly built libphp7.so, its date is from today. However with ldd you can see that the libicudata library is not resolved:

# ls -al /usr/lib/apache/libphp7.so
-rwxr-xr-x 1 root root 57380680 Mar 26 13:09 /usr/lib/apache/libphp7.so*
# ldd /usr/lib/apache/libphp7.so | grep libicudata
libicudata.so.48 => not found

The current version of libicudata is /usr/lib/x86_64-linux-gnu/libicudata.so.60. It's part of the libicu60 Ubuntu package.

However, I do seem to have the old file available in /usr/local/icu/lib/libicudata.so.48. However this file is from 2016, so I guess it's a leftover from an old version:

ls -al /usr/local/icu/lib/libicudata*
lrwxrwxrwx 1 root root 20 Apr 30 2016 /usr/local/icu/lib/libicudata.so -> libicudata.so.48.1.1
lrwxrwxrwx 1 root root 20 Apr 30 2016 /usr/local/icu/lib/libicudata.so.48 -> libicudata.so.48.1.1
-rw-r--r-- 1 root root 18281660 Apr 30 2016 /usr/local/icu/lib/libicudata.so.48.1.1

When I copy over that old library file, I can get my Apache server to come up again:

cp /usr/local/icu/lib/libicudata.so.48.1.1 /usr/lib/x86_64-linux-gnu/libicudata.so.48

But this is hacky and probably not the way to go.

Does anyone have any suggestions on how I can build PHP on Ubuntu 18.04 with a current version of libicudata?

Thanks!

was signed,
CrazyFrog
 

Zhenyapan

Verified User
Joined
Feb 23, 2018
Messages
683
Location
UA
If I'm not mistaken - DA keeps old libicu if you have PHP 5.x (any of them, no matter main or secondary ot third etc.)
if you have php 7+ only - you can update libicu by custombuild
 

CrazyFrog

Verified User
Joined
Aug 28, 2019
Messages
8
For those stumbling on this problem, I fixed the issue by moving /usr/local/icu to /usr/local/icu.old and redoing a custombuild. Then it compiled PHP using Ubuntu's newer libicudata.so.60.
 
Top