Le Sat, Feb 19, 2005 at 11:49:13PM -0500, Stephen Gran a ecrit :
> > # freshclam -v --debug
> > freshclam: relocation error: freshclam: undefined symbol: cli_strtok
> 
> This looks like a stale library lying around.  Can you paste the output
> of for i in `locate libclamav.so`; do ls -l $i; done

Ok, I had two versions of libclamav. Then I solve the bug.

# for i in $(locate libclamav.so); do ls -l $i; done
lrwxrwxrwx  1 root root 18 2005-02-19 17:35 /usr/lib/libclamav.so.1 ->
libclamav.so.1.0.8
-rw-r--r--  1 root root 270928 2005-02-18 02:08
/usr/lib/libclamav.so.1.0.8
lrwxrwxrwx  1 root staff 18 2003-04-01 14:36 /usr/local/lib/libclamav.so
-> libclamav.so.1.0.2
lrwxrwxrwx  1 root staff 18 2003-04-01 14:36
/usr/local/lib/libclamav.so.1 -> libclamav.so.1.0.2
-rwxr-xr-x  1 root staff 272911 2003-04-01 14:36
/usr/local/lib/libclamav.so.1.0.2

And I used the bad library :

# ldd $(which freshclam) | grep libclam
        libclamav.so.1 => /usr/local/lib/libclamav.so.1 (0xb7fcf000)

Remove old library solve the bug because cli_strtok() is a function introduced
recently.

Note that my desktop is powered by Debian unstable for several years. Then
the presence of libclamav.so.1.0.2 says that an old version oflibclamav1
was badly desinstalled. Perhaps a (pre/post)inst script could check if clamav
library is compatible with clamav-freshclam version...

Script could be like :

LIBCLAMAVSO1_VERSION=0.8

for i in `locate libclamav.so | cut -d "." -f4,5`; do
        if [ $i != $LIBCLAMAV_VERSION ]; then
                db_get clamav-fresclam/purgeoldlib || true;
                if [ "$RET" = "true" ]; then
                        echo "Purging old clamav libraries..."
                        purge_old_lib();               
                fi
        fi
done

Thanks,
-- 
Gregory Colpart <[EMAIL PROTECTED]>  GnuPG:1024D/C1027A0E
Evolix - Informatique et Logiciels Libres http://www.evolix.fr

Attachment: signature.asc
Description: Digital signature

Reply via email to