MoonPoint Support Logo


Shop Amazon Warehouse Deals - Deep Discounts on Open-box and Used ProductsAmazon Warehouse Deals

Advanced Search
Sun Mon Tue Wed Thu Fri Sat

Sat, Jan 07, 2006 6:02 pm

ClamAV Error While Loading Shared Libraries

I wanted to run the current version of the ClamAV antivirus software with a PLoP Linux boot CD. PLoP Linux provides a LiveCD that can be used to boot a Windows system and scan it for viruses. This can be useful when a Windows system is badly infected and you wish to avoid even booting into Windows to check the system. The version of PLoP Linux I downloaded from the developer's website at included ClamAV, but it was the 0.86.2 version rather than the current 0.87.1 version. I put the most current version of clamscan on a Zip disk, which I mounted after booting from the PLoP Linux CD, but when I tried to run the current version I got the message "error while loading shared libraries: libbz2.s0.1: cannot open shared object file: No such file or directory."

I used the ldd command on a Linux system where I had clamav working to find out what shared libraries it needed.

# ldd `which clamscan` => /usr/lib/ (0x40022000) => /usr/lib/ (0x4006e000) => /usr/lib/ (0x4007c000) => /usr/lib/ (0x4008b000) => /lib/tls/ (0x400b8000) => /lib/ (0x400c6000) => /lib/tls/ (0x42000000)
        /lib/ => /lib/ (0x40000000)

I then copied all of those files to the same directory on the Zip disk where I had the clamscan program. But I got the same error message when I ran clamscan. So clamscan wasn't able to find the libraries it needed in the current directory.

After reading the article CLI Magic: ldconfig and friends by Joe Barr, I realized I need only add the directory where I had stored the libraries to /etc/ file. So I added /mnt/zip to the end of /etc/


I then issued the ldconfig command. That allowed the newer version of clamscan I had on the Zip disk to look in the /mnt/zip directory while searching for the shared libraries it needed, when it couldn't find them in the other directories listed as locations for shared library files. I was then able to use /mnt/zip/clamscan to run the newer version on the Zip disk rather than the older version on the CD.

If you don't want to add a directory permanently to the list of directories searched for libraries, then you can issue the ldconfig command followed by the directory, e.g. ldconfig /mnt/zip would specify that the /mnt/zip directory be searched for libraries as well, but only until the system is rebooted.


  1. CLI Magic: ldconfig and friends
    By Joe Barr
    May 16, 2005
  2. What is ldconfig used for?
    By Nathan Wallace, Kim Shrier
    August 3, 1999
  3. Shared Libraries
    By David A. Wheeler
    April 11, 2003
  4. Building and Using Static and Shared "C" Libraries
    By Guy Keren
  5. LDD Library Dependencies
    By Karsten M. Self
    April 8, 2005
  6. Automatic Dependencies
    By Red Hat, Inc.

[/security/antivirus/clamav] permanent link

Once You Know, You Newegg AliExpress by

Shop Amazon Local - Subscribe to Deals in Your Neighborhood

Valid HTML 4.01 Transitional

Privacy Policy   Contact

Blosxom logo