I was following this guide to install clamav from source on Ubuntu 20.04 LTS and I stopped after getting the following error: freshclam: symbol lookup error: freshclam: undefined symbol: print_version, version FRESHCLAM_PRIVATE
.
Here are the commands I issued:
./configure --enable-check
make -j2
make check
make install
sudo cp /usr/local/etc/freshclam.conf.sample /usr/local/etc/freshclam.conf
sudo nano /usr/local/etc/freshclam.conf
In freshclam.conf, I have just added # before Example to comment it out. Then:
sudo mkdir /usr/local/share/clamav
freshclam
freshclam: symbol lookup error: freshclam: undefined symbol: print_version, version FRESHCLAM_PRIVATE
What does this error mean?
Here are the outputs of ./configure --enable-check and make check:
./configure --enable-check
configure: Summary of detected features follows
OS : linux-gnu
pthreads : yes (-lpthread)
configure: Summary of miscellaneous features
check : -lcheck_pic -pthread -lrt -lm -lsubunit
fanotify : yes
fdpassing : 1
IPv6 : yes
openssl : /usr
libcurl : /usr
configure: Summary of optional tools
clamdtop : yes (-Wl,-Bsymbolic-functions -lncurses -ltinfo)
milter : no (missing libmilter) (disabled)
clamsubmit : yes (libjson-c-dev found at /usr, linking=dynamic)
clamonacc : yes (auto)
configure: Summary of engine performance features
release mode: yes
llvm : no (disabled)
mempool : yes
configure: Summary of engine detection features
iconv : yes
bzip2 : ok
zlib : yes (from system)
unrar : yes
preclass : yes (libjson-c-dev found at /usr, linking=dynamic)
pcre : /usr
libmspack : yes (Internal)
libxml2 : yes, from /usr
yara : yes
fts : yes (libc)
configure: WARNING:
****** libjson-c is known to share symbol names with other JSON libraries
****** which may result in crashes for applications that use libclamav.
****** Consider using --with-libjson-static=path/to/libjson-c.a,
****** providing a json-c library that was compiled with CFLAGS="-fPIC".
make check
PASS: check_clamav
PASS: check_freshclam.sh
PASS: check_sigtool.sh
SKIP: check_unit_vg.sh
PASS: check1_clamscan.sh
PASS: check2_clamd.sh
PASS: check3_clamd.sh
PASS: check4_clamd.sh
SKIP: check5_clamd_vg.sh
SKIP: check6_clamd_vg.sh
SKIP: check7_clamd_hg.sh
SKIP: check8_clamd_hg.sh
SKIP: check9_clamscan_vg.sh
============================================================================
Testsuite summary for ClamAV 0.103.0
============================================================================
# TOTAL: 13
# PASS: 7
# SKIP: 6
# XFAIL: 0
# FAIL: 0
# XPASS: 0
# ERROR: 0
P.S. This is not the first time I try to install clamav on this computer. I didn't have this error the first time, but then I removed some files manually after doing sudo make uninstall
to completely remove clamav files and start installation from scratch. I also removed clamav user and group, and now they don't seem to be created automatically again, I wonder why.
I was able to solve this particular error by running
ldconfig
as root.