Updated: 9 November 2026 · Applies to: ClamAV 1.4 on Debian 13 and AlmaLinux 10 (EPEL), tested; cPanel ClamAV Scanner plugin (from cPanel documentation)
LibClamAV Error: cli_loaddbdir: No supported database files found in /var/lib/clamav means ClamAV has no virus signatures yet: the database folder is empty, so clamscan stops before it scans anything. Download the signatures as root with freshclam, then scan again.
freshclam
On a cPanel server that uses cPanel’s ClamAV Scanner plugin, use the plugin’s own copy instead:
/usr/local/cpanel/3rdparty/bin/freshclam
What the error looks like
We installed ClamAV on a fresh Debian 13 server and scanned a file before any update had run. Output:
LibClamAV Error: cli_loaddbdir: No supported database files found in /var/lib/clamav ERROR: Can't open file or directory ----------- SCAN SUMMARY ----------- Known viruses: 0 Engine version: 1.4.3 Scanned files: 0 Infected files: 0
The second line, ERROR: Can't open file or directory, does not mean your file is missing. It follows from the first error: with no database loaded, ClamAV cannot open anything for scanning. clamscan exits with code 2 (error) in this case. AlmaLinux 10 with ClamAV 1.4.6 from EPEL printed exactly the same two lines.
Why the database folder is empty
- ClamAV was just installed. The packages do not contain signatures. On Debian and Ubuntu the folder was owned by
clamavand empty; on AlmaLinux it was owned byclamupdateand empty. - freshclam never ran, or its timer or service is switched off.
- freshclam fails: no outgoing HTTPS from the server, a firewall or proxy in the way, or the ClamAV download servers blocking a server that asked too often.
- The scanner looks in a different folder from the one freshclam fills, for example a scanner run with
--database=/some/path, or two ClamAV installs side by side (the system package and cPanel’s plugin).
Fix on Debian and Ubuntu
- Install the scanner and the updater:
apt install clamav clamav-freshclam
- Download the signatures:
freshclam
Output (shortened):
daily.cvd updated (version: 28177, sigs: 355854, f-level: 90, builder: svc.clamav-publisher) main.cvd updated (version: 63, sigs: 3287027, f-level: 90, builder: tomjudge) bytecode.cvd updated (version: 339, sigs: 80, f-level: 90, builder: nrandolp)
The download was about 110 MB in our test. If freshclam ends with
NotifyClamd: Can't find or parse configuration file /etc/clamav/clamd.conf, that is harmless when you do not run theclamddaemon: the signatures are already saved. - Check the folder now has
main.cvd,daily.cvdandbytecode.cvd:ls -l /var/lib/clamav
- On a normal server the
clamav-freshclamservice keeps them up to date. Make sure it is running:systemctl enable --now clamav-freshclam
A warning such as Your ClamAV installation is OUTDATED! with a “Recommended version” only says a newer ClamAV exists; the update still works. Install the distribution’s package updates as usual.
Fix on AlmaLinux, Rocky Linux and RHEL (EPEL)
- Enable EPEL and install ClamAV with its updater:
dnf install epel-release dnf install clamav clamav-freshclam
On AlmaLinux 10 the updater package is named
clamav-freshclam; older guides useclamav-update. - Download the signatures:
freshclam
- Keep them updated automatically with the systemd service the package ships (it is disabled after install):
systemctl enable --now clamav-freshclam
Check that scanning works
The EICAR test file is a harmless string that every antivirus detects. Create it and scan it:
printf '%s' 'X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*' > /root/eicar.txt clamscan /root/eicar.txt
Output (shortened):
/root/eicar.txt: Eicar-Test-Signature FOUND ----------- SCAN SUMMARY ----------- Known viruses: 3628258 Engine version: 1.4.3 Scanned files: 1 Infected files: 1
Delete the test file afterwards. clamscan loads the whole database each time it starts; in our lab test that took about 18 seconds and a lot of memory, so on a very small VPS a full scan can be slow.
cPanel servers (ClamAV Scanner plugin)
According to cPanel, the ClamAV Scanner is installed from WHM > cPanel > Manage Plugins, and its programs live in /usr/local/cpanel/3rdparty/bin/ (clamscan, clamdscan and freshclam). If you run a plain clamscan and get the error, you may be calling a different ClamAV than the one cPanel updates. Update and scan with the full paths:
/usr/local/cpanel/3rdparty/bin/freshclam /usr/local/cpanel/3rdparty/bin/clamscan -ir /home/alice/public_html
cPanel’s own documentation now recommends ImunifyAV over ClamAV for malware scanning on cPanel servers.
Linux Malware Detect (maldet)
If maldet uses ClamAV as its scan engine, the same error appears in its scans while ClamAV has no signatures. Run freshclam first (step 2 above), then update maldet’s own signatures with maldet -u and scan again.
If freshclam still fails
- Test outgoing HTTPS from the server:
curl -I https://database.clamav.net/. If it times out, allow outgoing port 443 in your firewall. - If freshclam reports that the server is rate limited or blocked, stop running it in a loop or from several cron jobs at once, wait, and let the service update on its normal schedule.
- Check that the database folder belongs to the update user (
clamavon Debian and Ubuntu,clamupdateon AlmaLinux) and that the disk is not full:df -h /var/lib.
Malware on a website usually starts with an outdated CMS or plugin; see the WordPress hardening checklist.
Official documentation: cPanel: Configure ClamAV Scanner.