I can't update the clamav antivirus

24,977

I suppose that you cannot update clamav database due to it being locked by running daemon. Presumably Ubuntu proceeds with an automatic update.

To update virus database manually, you have to stop daemon by typing in CLI:

sudo /etc/init.d/clamav-freshclam stop

Now you can update virus signatures:

sudo freshclam -v

Finally, restart daemon with

sudo /etc/init.d/clamav-freshclam start
Share:
24,977

Related videos on Youtube

Henry WH Hack v3.0b
Author by

Henry WH Hack v3.0b

Henry Winston Helmar Hackintosh here (Except Hackintosh is not my real name.) If you have to make a complaint about me just simply go to this chatroom and click request access to open a ticket. I am the ghost of Stack Exchange and the personification/incarnation of Stack Exchange private beta sites! Stack Exchange operation hours 0400 UTC - 2100 UTC. (Due to some technical difficulties I am not on Stack Exchange much.) Current Version: v3.0b Major Future Versions: Mod Edition, CM Edition and Dev Edition I am trying to be as helpful as possible on the Stack Exchange network. Here are the tasks I do on the Stack Exchange sites (v2.1.2): I flag bad post. (Network wide) I do edits on some SE sites. I do reviews on some SE sites. I help out with some moderation on Area51.SE. (I was running out of ideas so why not.) (Area51.SE is kind of dead, hardly anything to do.) Working on more ways to be helpful. FAQ: Q: Why are you doing this? A: It all started when I found out about Robert Cartaino, just kidding it happened long before that I just do them because, I am trying to be helpful. :) RC ♦ is the man! Dev Dev Dev! Shadow man! Interpersonal girl: Fun Stuff: 100% NOT A REAL CERTIFICATE

Updated on September 18, 2022

Comments

  • Henry WH Hack v3.0b
    Henry WH Hack v3.0b over 1 year

    I was updating the clamav antivirus defenitons with the sudo freshclam command and the output was:

    ERROR: /var/log/clamav/freshclam.log is locked by another process
    ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
    
  • Admin
    Admin over 8 years
    You are correct, this error is because the daemon is running. +1 for beating me to the answer. =) By the way, after completing the setup, it will let you run the sudo freshclam.
  • Admin
    Admin over 8 years
    @Terrance: I'm sure I've also seen this question asked before (I think I may have even answered it), but I can't find it to mark as duplicate...
  • Admin
    Admin over 8 years
    I know I have answered it too once before. =) I'll take a look.
  • Admin
    Admin over 8 years
    You actually asked it: askubuntu.com/q/636851/231142
  • Admin
    Admin over 8 years
    @Terrance: Oh, how funny! :D
  • j4m3z0r
    j4m3z0r over 8 years
    You'd be better off just setting it to cron in the configuration, why set it to deamon if you don't want it all the time?
  • Christianus
    Christianus over 8 years
    I don't value what's better. I answered the question.
  • Admin
    Admin over 7 years
    I was having the same issue in Ubuntu 16.04 after a fresh install of clamav (without the daemon) and a reboot. Reconfiguring clamav-freshclam, as suggested, fixed the issue.
  • Admin
    Admin about 7 years
    I need to use this suggestion as well. Needed. askubuntu.com/questions/526317/cant-run-freshclam
  • rudolfbyker
    rudolfbyker over 5 years
    No need to shout :)
  • noobninja
    noobninja over 4 years
    sudo systemctl stop clamav-freshclam then sudo freshclam then sudo systemctl start clamav-freshclam