clamav error

Juliano Silva

Well-Known Member
Oct 15, 2017
186
3
58
40
Nov 30 16:50:01 protection.server.com.br systemd[1]: Starting Clam AntiVirus userspace daemon...
Nov 30 16:50:01 protection.server.com.br mkdir[31900]: /bin/mkdir: cannot create directory â/run/clamavâ: File exists
Nov 30 16:50:01 protection.server.com.br systemd[1]: Started Clam AntiVirus userspace daemon.
Nov 30 16:50:01 protection.server.com.br clamd[31911]: WARNING: Ignoring deprecated option DetectBrokenExecutables at /etc/clamav/clamd.conf:35




ov 30 16:50:33 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:33 2019 -> Reading CVD header (main.cvd): Sat Nov 30 16:50:33 2019 -> ^Can't get information about database.clamav.net: Temporary failure in name resolution
Nov 30 16:50:33 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:33 2019 -> ^Can't read main.cvd header from database.clamav.net (IP: )
Nov 30 16:50:33 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:33 2019 -> Trying again in 5 secs...
Nov 30 16:50:38 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:38 2019 -> ^Can't query current.cvd.clamav.net
Nov 30 16:50:38 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:38 2019 -> ^Invalid DNS reply. Falling back to HTTP mode.
Nov 30 16:50:38 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:38 2019 -> Reading CVD header (main.cvd): Sat Nov 30 16:50:38 2019 -> ^Can't get information about database.clamav.net: Temporary failure in name resolution
Nov 30 16:50:38 protection.server.com.br freshclam[31836]: Sat Nov 30 16:50:38 2019 -> ^Can't read main.cvd header from database.clamav.net (IP: )
Nov 30 16:50:38 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:38 2019 -> Trying again in 5 secs...
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> ^Can't query current.cvd.clamav.net
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> ^Invalid DNS reply. Falling back to HTTP mode.
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> Reading CVD header (main.cvd): Sat Nov 30 16:50:43 2019 -> !Can't get information about database.clamav.net: Temporary failure in name resolution
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> ^Can't read main.cvd header from database.clamav.net (IP: )
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> Giving up on database.clamav.net...
Nov 30 16:50:43 protection.emailsecurity.com.br freshclam[31836]: Sat Nov 30 16:50:43 2019 -> Update failed. Your network may be down or none of the mirrors listed in /etc/clamav/freshclam.conf is working. Check https://www.clamav.net/documents/official-mirror-faq for possible reasons
 
Do you still have apparmor installed?
dpkg -l| grep apparmor

if yes - please remove that package

I hope this helps!
 
apparmor removedo still having problems

clamav-daemon failed
clamav-freshclam failed

Dec 03 22:27:45 protection.emailsecurity.com.br systemd[1]: Starting Clam AntiVirus userspace daemon...
Dec 03 22:27:45 protection.emailsecurity.com.br systemd[1]: Started Clam AntiVirus userspace daemon.
Dec 03 22:29:29 protection.emailsecurity.com.br clamd[1077]: ERROR: LOCAL: Socket allocation error: Permission denied
Dec 03 22:29:29 protection.emailsecurity.com.br systemd[1]: clamav-daemon.service: Main process exited, code=exited, status=1/FAILURE
Dec 03 22:29:29 protection.emailsecurity.com.br systemd[1]: clamav-daemon.service: Failed with result 'exit-code'
 
you need to reboot after app-armor removal - otherwise the profiles are still loaded
 
Glad you solved your issue!
Please mark the thread as 'SOLVED'

Thanks!
 
I'm getting error like this:

Feb 12 18:43:25 server clamd[17670]: /var/spool/pmg/active/406FE5E44717D971E9: Can't open file or directory ERROR
Feb 12 18:43:25 server clamd[17670]: /var/spool/pmg/active/406FE5E44717D971E9: Can't open file or directory ERROR

When I run the command:

root@server:/var/spool/pmg# dpkg -l| grep apparmor
ii libapparmor1:amd64 2.13.2-10 amd64 changehat AppArmor library

I already removed the apparmor, but there is still this lib, but it removes several others.

Code:
root@server:/var/spool/pmg# apt-get remove libapparmor1
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libappstream4 libargon2-1 libcryptsetup12 libglib2.0-bin libgstreamer1.0-0 libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libstemmer0d
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  dbus libapparmor1 libnss-systemd libpam-systemd packagekit packagekit-tools policykit-1 systemd systemd-sysv
0 upgraded, 0 newly installed, 9 to remove and 0 not upgraded.
After this operation, 18.8 MB disk space will be freed.
Do you want to continue? [Y/n]


Should I remove accept removing the libs? Or do you suggest another solution to my error?
 
Should I remove accept removing the libs? Or do you suggest another solution to my error?
* No - libapparmor can stay on the system - it's the apparmor package that's causing the issue.

* did you reboot after removing apparmor? (this is needed to deactivate apparmor)

If this still happens after a reboot - please check the output of `dmesg` (apparmor messages end up there)
and the journal for hints

thanks!
 
  • Like
Reactions: thiagotgc
Hi, I'm getting the following error when updating clam:
-----------
/usr/bin/freshclam: relocation error: /usr/bin/freshclam: symbol cli_gentemp_with_prefix version CLAMAV_PRIVATE not defined in file libclamav.so.9 with link time reference
TASK ERROR: command '/usr/bin/freshclam --stdout' failed: exit code 127
-----------
pmg version is: 6.2.3

Any ideas?

/Peter
 
please post:
* `pmgversion -v`
* `apt update; apt -s full-upgrade`

also check `dmesg` for messages from apparmor (although the messages would point to a problem with your installed packages)
 
hmm - looks all ok - the only potential oddity is that you have buster-backports configured as repository
could you please paste the output of:
* `dpkg -l |grep clam`
* `freshclam -v --debug`

thanks
 
hmm - seems some parts of your system still run clamav version 0.101.4:
Code:
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.4 Recommended version: 0.102.2

which is a mismatch to the installed packages ...

on a hunch I would say that it might be fixed with a reboot.
 
hmm - seems some parts of your system still run clamav version 0.101.4:
Code:
Software version from DNS: 0.102.2
WARNING: Your ClamAV installation is OUTDATED!
WARNING: Local version: 0.101.4 Recommended version: 0.102.2

which is a mismatch to the installed packages ...

on a hunch I would say that it might be fixed with a reboot.

Reboot, didn't work.
Is there an easy way of reinstalling clamav or the missing or "wrong" components?
 
that's odd - any chance another clamav install ended up on the system?
please provide:
* ` lsof -np $(pgrep freshclam)` (you might need to install lsof for this -> `apt install lsof`)
* ` ldd /usr/bin/freshclam`
(if possible please use code-tags and paste the output directly instead of attaching a text file)

you can try to reinstall all clamav packages as well:
* `apt install --reinstall clamav-base clamav-daemon clamav-freshclam clamdscan libclamav9:amd64`

check the output for errors

I hope this helps!
 
that's odd - any chance another clamav install ended up on the system?
please provide:
* ` lsof -np $(pgrep freshclam)` (you might need to install lsof for this -> `apt install lsof`)
* ` ldd /usr/bin/freshclam`
(if possible please use code-tags and paste the output directly instead of attaching a text file)

you can try to reinstall all clamav packages as well:
* `apt install --reinstall clamav-base clamav-daemon clamav-freshclam clamdscan libclamav9:amd64`

check the output for errors

I hope this helps!

Hi Stoiko

Output from cli:

Code:
root@pmg:~# lsof -np $(pgrep freshclam)
lsof: no process ID specified
lsof 4.91
 latest revision: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/
 latest FAQ: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/FAQ
 latest man page: ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/lsof_man
 usage: [-?abhKlnNoOPRtUvVX] [+|-c c] [+|-d s] [+D D] [+|-E] [+|-e s] [+|-f[gG]]
 [-F [f]] [-g [s]] [-i [i]] [+|-L [l]] [+m [m]] [+|-M] [-o [o]] [-p s]
 [+|-r [t]] [-s [p:s]] [-S [t]] [-T [t]] [-u s] [+|-w] [-x [fl]] [--] [names]
Use the ``-h'' option to get more help information.
root@pmg:~# ldd /usr/bin/freshclam
        linux-vdso.so.1 (0x00007ffd7adb1000)
        libclamav.so.9 => /usr/local/lib/libclamav.so.9 (0x00007f712639e000)
        libfreshclam.so.2 => /usr/lib/x86_64-linux-gnu/libfreshclam.so.2 (0x00007f712636c000)
        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f712634b000)
        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f712618a000)
        libxml2.so.2 => /usr/lib/x86_64-linux-gnu/libxml2.so.2 (0x00007f7125fe1000)
        libbz2.so.1.0 => /lib/x86_64-linux-gnu/libbz2.so.1.0 (0x00007f7125fce000)
        libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f7125fc7000)
        libclammspack.so.0 => /usr/local/lib/libclammspack.so.0 (0x00007f7125db4000)
        libssl.so.1.1 => /usr/lib/x86_64-linux-gnu/libssl.so.1.1 (0x00007f7125d22000)
        libcrypto.so.1.1 => /usr/lib/x86_64-linux-gnu/libcrypto.so.1.1 (0x00007f7125a39000)
        libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f712581b000)
        libjson-c.so.3 => /usr/lib/x86_64-linux-gnu/libjson-c.so.3 (0x00007f712580e000)
        libpcre.so.3 => /lib/x86_64-linux-gnu/libpcre.so.3 (0x00007f7125798000)
        libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f7125615000)
        libresolv.so.2 => /lib/x86_64-linux-gnu/libresolv.so.2 (0x00007f71255fb000)
        libcurl.so.4 => /usr/lib/x86_64-linux-gnu/libcurl.so.4 (0x00007f712556a000)
        libltdl.so.7 => /usr/lib/x86_64-linux-gnu/libltdl.so.7 (0x00007f712555f000)
        libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f71253db000)
        libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f71253bf000)
        /lib64/ld-linux-x86-64.so.2 (0x00007f71267b3000)
        libicui18n.so.63 => /usr/lib/x86_64-linux-gnu/libicui18n.so.63 (0x00007f71250e4000)
        libicuuc.so.63 => /usr/lib/x86_64-linux-gnu/libicuuc.so.63 (0x00007f7124f15000)
        libicudata.so.63 => /usr/lib/x86_64-linux-gnu/libicudata.so.63 (0x00007f7123525000)
        liblzma.so.5 => /lib/x86_64-linux-gnu/liblzma.so.5 (0x00007f71234fd000)
        libnghttp2.so.14 => /usr/lib/x86_64-linux-gnu/libnghttp2.so.14 (0x00007f71234d3000)
        libidn2.so.0 => /usr/lib/x86_64-linux-gnu/libidn2.so.0 (0x00007f71234b4000)
        librtmp.so.1 => /usr/lib/x86_64-linux-gnu/librtmp.so.1 (0x00007f7123297000)
        libssh2.so.1 => /usr/lib/x86_64-linux-gnu/libssh2.so.1 (0x00007f7123269000)
        libpsl.so.5 => /usr/lib/x86_64-linux-gnu/libpsl.so.5 (0x00007f7123256000)
        libgssapi_krb5.so.2 => /usr/lib/x86_64-linux-gnu/libgssapi_krb5.so.2 (0x00007f7123209000)
        libkrb5.so.3 => /usr/lib/x86_64-linux-gnu/libkrb5.so.3 (0x00007f7123127000)
        libk5crypto.so.3 => /usr/lib/x86_64-linux-gnu/libk5crypto.so.3 (0x00007f71230f3000)
        libcom_err.so.2 => /lib/x86_64-linux-gnu/libcom_err.so.2 (0x00007f71230ed000)
        libldap_r-2.4.so.2 => /usr/lib/x86_64-linux-gnu/libldap_r-2.4.so.2 (0x00007f7123099000)
        liblber-2.4.so.2 => /usr/lib/x86_64-linux-gnu/liblber-2.4.so.2 (0x00007f7123088000)
        libunistring.so.2 => /usr/lib/x86_64-linux-gnu/libunistring.so.2 (0x00007f7122f02000)
        libgnutls.so.30 => /usr/lib/x86_64-linux-gnu/libgnutls.so.30 (0x00007f7122d56000)
        libhogweed.so.4 => /usr/lib/x86_64-linux-gnu/libhogweed.so.4 (0x00007f7122d1d000)
        libnettle.so.6 => /usr/lib/x86_64-linux-gnu/libnettle.so.6 (0x00007f7122ce5000)
        libgmp.so.10 => /usr/lib/x86_64-linux-gnu/libgmp.so.10 (0x00007f7122c62000)
        libgcrypt.so.20 => /lib/x86_64-linux-gnu/libgcrypt.so.20 (0x00007f7122b44000)
        libkrb5support.so.0 => /usr/lib/x86_64-linux-gnu/libkrb5support.so.0 (0x00007f7122b33000)
        libkeyutils.so.1 => /lib/x86_64-linux-gnu/libkeyutils.so.1 (0x00007f7122b2c000)
        libsasl2.so.2 => /usr/lib/x86_64-linux-gnu/libsasl2.so.2 (0x00007f7122b0f000)
        libp11-kit.so.0 => /usr/lib/x86_64-linux-gnu/libp11-kit.so.0 (0x00007f71229e0000)
        libtasn1.so.6 => /usr/lib/x86_64-linux-gnu/libtasn1.so.6 (0x00007f71227cd000)
        libgpg-error.so.0 => /lib/x86_64-linux-gnu/libgpg-error.so.0 (0x00007f71227a8000)
        libffi.so.6 => /usr/lib/x86_64-linux-gnu/libffi.so.6 (0x00007f712279e000)
root@pmg:~#

I tried the reinstall you posted, but I still get:
'/usr/bin/freshclam: relocation error: /usr/bin/freshclam: symbol cli_gentemp_with_prefix version CLAMAV_PRIVATE not defined in file libclamav.so.9 with link time reference
TASK ERROR: command '/usr/bin/freshclam --stdout' failed: exit code 127'

Thanks,
Peter
 
is it conflict with an earlier installation, that needs to be removed or???

Output from the reinstall is here:
Code:
root@pmg:~# apt install --reinstall clamav-base clamav-daemon clamav-freshclam clamdscan libclamav9:amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 5 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0 B/1,560 kB of archives.
After this operation, 0 B of additional disk space will be used.
Preconfiguring packages ...
(Reading database ... 136432 files and directories currently installed.)
Preparing to unpack .../clamav-base_0.102.2+dfsg-1~pmg1_all.deb ...
Unpacking clamav-base (0.102.2+dfsg-1~pmg1) over (0.102.2+dfsg-1~pmg1) ...
Preparing to unpack .../clamav-daemon_0.102.2+dfsg-1~pmg1_amd64.deb ...
Unpacking clamav-daemon (0.102.2+dfsg-1~pmg1) over (0.102.2+dfsg-1~pmg1) ...
Preparing to unpack .../clamav-freshclam_0.102.2+dfsg-1~pmg1_amd64.deb ...
Unpacking clamav-freshclam (0.102.2+dfsg-1~pmg1) over (0.102.2+dfsg-1~pmg1) ...
Preparing to unpack .../clamdscan_0.102.2+dfsg-1~pmg1_amd64.deb ...
Unpacking clamdscan (0.102.2+dfsg-1~pmg1) over (0.102.2+dfsg-1~pmg1) ...
Preparing to unpack .../libclamav9_0.102.2+dfsg-1~pmg1_amd64.deb ...
Unpacking libclamav9:amd64 (0.102.2+dfsg-1~pmg1) over (0.102.2+dfsg-1~pmg1) ...
Setting up libclamav9:amd64 (0.102.2+dfsg-1~pmg1) ...
Setting up clamav-base (0.102.2+dfsg-1~pmg1) ...
Setting up clamav-freshclam (0.102.2+dfsg-1~pmg1) ...
Setting up clamdscan (0.102.2+dfsg-1~pmg1) ...
Setting up clamav-daemon (0.102.2+dfsg-1~pmg1) ...#############..................]
Processing triggers for systemd (241-7~deb10u3) ...
Processing triggers for man-db (2.8.5-2) ...
Processing triggers for libc-bin (2.28-10) ...
root@pmg:~#

/Peter
 
libclamav.so.9 => /usr/local/lib/libclamav.so.9 (0x00007f712639e000)
this is most likely the culprit - it seems you have somehow installed clamav from somewhere else into /usr/local ?!
Neither PMG nor Debian install packaged software to /usr/local - so I would guess that this came from somewhere else.

Did you install anything custom on the PMG?
 
this is most likely the culprit - it seems you have somehow installed clamav from somewhere else into /usr/local ?!
Neither PMG nor Debian install packaged software to /usr/local - so I would guess that this came from somewhere else.

Did you install anything custom on the PMG?

No, nothing else is installed on the server, but at some stage clamav may have been installed manually (I'm not sure though, just saying it might have).

/Peter
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!