On CL6 servers, ClamAV fails to start with the following error message:
Service “clamd” is already stopped.
/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:
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.
We've opened an internal case with our development team to investigate this further. For reference, the case number is CPANEL-38315. Follow this article to receive an email notification when a solution is published in the product.
To get around this issue, you can manually install the missing package and then restart ClamD:
yum install pcre2