I am trying to install clamav 0.80 on OpenBSD 3.6
I used the code from www.fatbsd.com/openbsd/

When I try to run clamd in chroot (or "freshclam -d" or "clamd -h") I get:

# chroot -u _amavisd /var/amavisd /usr/local/bin/freshclam
/usr/local/bin/freshclam: can't load library 'libgmp.so.6.3'

# chroot -u _amavisd /var/amavisd /usr/local/bin/freshclam
/usr/local/bin/freshclam: can't load library 'libcurl.so.2.2'

# chroot -u _amavisd /var/amavisd /usr/local/bin/freshclam
/usr/local/bin/freshclam: can't load library 'libbz2.so.10.2'

Each time you run it, it complains about a different library that it can't
load (random order).

According to the "ClamAV chroot setup HOWTO" post, it says "Note, the one
library that doesn't show up through ldd, but is needed is
/lib/libnss_files*. Make sure you copy it to the chroot jail."  I assume
this is a Linux requirement only?  As I don't have any libnss_files on my
system.
https://www.grigorians.org/phpwiki/index.php/ClamAV%20chroot%20setup%20HOWTO

My chroot folder contains the following bin files:

#  find . -print | grep bin
./usr/bin
./usr/bin/file
./usr/bin/gzip
./usr/bin/arc
./usr/bin/bzip2
./usr/bin/zoo
./usr/bin/unrar
./usr/bin/unarj
./usr/bin/lha
./usr/local/bin
./usr/local/bin/freshclam
./usr/local/bin/clamscan
./usr/local/bin/clamdscan
./usr/local/bin/clamav-config
./usr/local/sbin
./usr/local/sbin/clamd

I then copied the required lib files using:

cd /var/amavisd
FILES=` find . -type f | grep "bin/"`
set `for FILE in $FILES; do ldd $FILE; done | grep " /" | awk ' {print $NF}'
| sort -u | cut -c2-`
for LIB in $*
do
  rm -rf $LIB
  echo "copying /$LIB..."
  mkdir -p `dirname $LIB` 2>/dev/null
  cp -p /$LIB $LIB
done

So my chroot folder contains the following lib files:

./usr/lib/libc.so.34.1
./usr/lib/libcrypto.so.11.0
./usr/lib/libpthread.so.6.0
./usr/lib/libssl.so.9.0
./usr/lib/libz.so.4.0
./usr/lib/libm.so.2.0
./usr/lib/libstdc++.so.33.0
./usr/libexec/ld.so
./usr/local/lib/libbz2.so.10.2
./usr/local/lib/libclamav.so.1.4
./usr/local/lib/libcurl.so.2.2
./usr/local/lib/libgmp.so.6.3
./usr/local/lib/libclamav.a
./usr/local/lib/libclamav.la


_______________________________________________ http://lists.clamav.net/cgi-bin/mailman/listinfo/clamav-users

Reply via email to