LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav
Asked Answered
D

3

23

When I tried to Scan the /home directory I got this error.

[root@ip-172-31-34-67 ~]# clamscan /home
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: 0.103.0
Scanned directories: 0
Scanned files: 0
Infected files: 0
Data scanned: 0.00 MB
Data read: 0.00 MB (ratio 0.00:1)
Time: 0.004 sec (0 m 0 s)
Start Date: 2021:01:17 17:43:31
End Date:   2021:01:17 17:43:31
[root@ip-172-31-34-67 ~]#

It shows on supported database files found in /var/lib/clamav, which may caused the issue?

Descendible answered 17/1, 2021 at 17:48 Comment(1)
You should explain what packages you did install before running the command.Mcnamee
F
32

You will need to use the command:

freshclam

to create the neccesary virus database files.

This can then be set up as a service to periodically update the database.

Flog answered 18/1, 2021 at 10:14 Comment(2)
$ sudo freshclam ERROR: /var/log/clamav/freshclam.log is locked by another process ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log). ERROR: initialize: libfreshclam init failed. ERROR: Initialization error!Snowbird
This command will surely error. It will be required to stop already running service of freshclam as daemon first. Same is suggested at answere of @Anas BenDestalinization
E
20

Run :

  • sudo service clamav-freshclam stop
  • sudo freshclam
  • sudo service clamav-freshclam start
Enfeeble answered 9/8, 2021 at 9:7 Comment(3)
Please add an explanation what the commands above do. We are humans, not batch processors ;-)Mcnamee
1. stops the clamav daemon on your computer 2. update the virus database from the clam server to your computer 3. restart the clamav daemonDefrost
little more detail for this approach.. It becomes necessary to stop the service as in first point.. else point.2 command will not runDestalinization
D
5

This clam business is tricky, because sudo freshclam will get you locked for 24 hrs if, like me, you're innocently trying to build from source and don't have everything quite right. Being limited to work on the problem once every 24 hrs makes for a difficult build/install indeed. Only by chance on a 3rd-party website did I find that an alternate way to get the database is to download from https://database.clamav.net/daily.cvd, then manually copy it into /var/lib/clamav

Defrost answered 6/7, 2022 at 21:38 Comment(2)
agree,don't forget to download database.clamav.net/main.cvd tooVert
this just saved me so much frustrationFrumentaceous

© 2022 - 2024 — McMap. All rights reserved.