If you have your cPanel updates configured to also update your system you may have noticed your php start having issues last night.

Percona’s latest update (details here) is causing problems for many cPanel customers.

The Basics

They explain what’s going on in their post:

“In order to comply with Linux distribution packaging standards Percona‘s version of libmysqlclient has been renamed to libperconaserver. The old name was conflicting with the upstream libmysqlclient. Except for packaging, libmysqlclient and libperconaserverclient of the same version do not have any differences. Users wishing to continue using libmysqlclient will have to install the corresponding package of their distribution, such as mysql-lib for CentOS and libmysqlclient18 for Ubuntu/Debian. Users wishing to build software against libperconaserverclient should install libperconaserverclient-dev package. An old version of Percona-built libmysqlclient will be available for download.”

The quickest workaround that we have seen work is just to symlink the new library to where php thinks it should be:

# ln -s /usr/lib64/libperconaserverclient.so /usr/lib64/libmysqlclient.so

You will then need to also run an EasyApache update in order for everything to work correctly, but this is the quickest way to correct the error that we’ve seen.

What the errors will look like

You’re most likely to see the errors present when looking at php version, or when trying to run an easyapache.

# php -v
php: error while loading shared libraries: libmysqlclient.so.18: cannot open shared object file: No such file or directory

EasyApache error:

configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!
!! './configure [snip] failed with exit code '256' !!