问题描述
我遵循this guide在Ubuntu 20.04 LTS上从源代码安装clamav,在遇到以下错误后我停止了运行:freshclam: symbol lookup error: freshclam: undefined symbol: print_version,version FRESHCLAM_PRIVATE
。
这是我发出的命令:
./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
在freshclam.conf中,我在Example之前添加了#,以将其注释掉。 然后:
sudo mkdir /usr/local/share/clamav
freshclam
freshclam: symbol lookup error: freshclam: undefined symbol: print_version,version FRESHCLAM_PRIVATE
此错误是什么意思?
以下是./configure --enable-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。这不是我第一次尝试在此计算机上安装clamav。我第一次没有这个错误,但是在完成sudo make uninstall
以完全删除clamav文件并从头开始安装之后,我手动删除了一些文件。我还删除了clamav用户和组,现在它们似乎不再自动创建,我想知道为什么。
解决方法
我能够通过以 root 身份运行 ldconfig
来解决这个特定错误。