I apologize in advance if this is a ClamAV problem insted of an OpenSuse problem. (It turned out it is a different way of doing things problem).
I installed the version of ClamAV that is provided by OpenSuse. The problem with that is that when a new version of ClamAV shows up I constantly get complaints when I run both freshclam and clamscan for at least three weeks when my version of ClamAV supplied by OpenSuse goes out of date. So I uninstalled the clamav OpenSuse provides using the GUI software control panel. Then I downloaded the source and the signature from ClamAV. It verified. I first tried to do a ./configure (as root) but it said I needed a clamav user. So I created:
Group: clamav (2001)
User: clamav (2001)
I picked the UID / GID to be that to avoid collisions with what ever you may have. After that the configure, make and install went fine. I then edited both the clamd.conf file and freshclam.conf files in /usr/local/etc. There was a bit of path confusion problem with the old freshclam and the new one so I did a ^D in my su’d xterm, and then su’d again. This time it showed the following for where things are:
whereis freshclam
freshclam: /usr/local/bin/freshclam /usr/local/etc/freshclam.conf
which freshclam
/usr/local/bin/freshclam
But when I run freshclam I get:
freshclam
freshclam: error while loading shared libraries: libclamav.so.6: cannot open shared object file: No such file or directory
Huh? So I see if the libarary is there:
cd /usr/local/lib
ls -l libclamav.*
-rwxr-xr-x 1 root root 1017 Oct 3 01:09 libclamav.la
lrwxrwxrwx 1 root root 18 Oct 3 01:09 libclamav.so -> libclamav.so.6.1.5
lrwxrwxrwx 1 root root 18 Oct 3 01:09 libclamav.so.6 -> libclamav.so.6.1.5
-rwxr-xr-x 1 root root 12929399 Oct 3 01:09 libclamav.so.6.1.5
/usr/local/lib is in the /etc/ld.so.conf file, so why can’t freshclam find the library? Is ClamAV using a shell environment variable? In the past I was on RedHat / Fedora and had no problems rolling my own ClamAV, but if my memory is correct they did have a library path in shell. Never mind. I just tried this and it works:
export LD_LIBRARY_PATH=**************
(all of stuff in the /etc/ld.so.conf file except the last line, colon “:” seperated)
I suggest adding a LD_LIBRARY_PATH environment variable to the various shells to avoid this problem in the future. There is bound to be other stuff besides ClamAV that uses LD_LIBRARY_PATH instead of the etc/ld.so.conf file. The puzzling thing is that this variable was not shown in the bash man page. I have no idea where it belongs, but bash will be the first place somebody may check for the name of the library path environment variable. The only reason I mention this is that on some 'nix systems it seemed to use something else on LD_LIBRARY_PATH. I hope by now everybody has standardized on LD_LIBRARY_PATH.