Clamd failed after cPanel v98.0.x upgrade on CloudLinux 6
« on: August 26, 2021, 04:44:28 PM »
After recent cPanel update to cPanel v98.0 on CloudLinux 6 server, clamd is failing as follow:

Code: [Select]
/scripts/restartsrv_clamd --start
Service “clamd” is already stopped.
[...............]
Startup Log
/usr/local/cpanel/3rdparty/bin/clamd: error while loading shared libraries: libpcre2-8.so.0: cannot open shared object file: No such file or directory

clamd has failed. Contact your system administrator if the service does not automagically recover.

This is due to a missing shared library object (libpcre2-8.so.0) file that is required by ClamAV which you can confirm by this:
Code: [Select]
ldd /usr/local/cpanel/3rdparty/bin/clamd
[...............]
libz.so.1 => /lib64/libz.so.1 (0x00007f64ae2db000)
libpcre2-8.so.0 => not found
libm.so.6 => /lib64/libm.so.6 (0x00007f64ae056000)
[...............]

The libpcre2-8.so.0 shared library file is provided by the pcre2 package. However that package fails to be installed as a dependency when ClamAV is installed on the server.

Workaround

To get around this issue, you can manually install the missing package and then restart ClamD:

Code: [Select]
yum install pcre2
Code: [Select]
/scripts/restartsrv_clamd --start