我安装了适用于 Linux 的 clamav 防病毒软件。现在我在终端中运行以下命令并出现错误。我该如何修复它?
$ sudo freshclam
ERROR: /var/log/clamav/freshclam.log is locked by another process
ERROR: Problem with internal logger (UpdateLogFile = /var/log/clamav/freshclam.log).
答案1
freshclam
应该已经作为守护进程运行,这就是您收到该消息的原因。如果您运行以下命令,您应该会看到更新正在进行:
tail -10 /var/log/clamav/freshclam.log
这是我的一个例子:
terrance@terrance-ubuntu:~$ tail -10 /var/log/clamav/freshclam.log
Fri Dec 23 19:08:16 2016 -> safebrowsing.cld is up to date (version: 45370, sigs: 2490012, f-level: 63, builder: google)
Fri Dec 23 19:08:16 2016 -> bytecode.cld is up to date (version: 285, sigs: 57, f-level: 63, builder: bbaker)
Fri Dec 23 19:08:16 2016 -> --------------------------------------
Fri Dec 23 20:08:16 2016 -> Received signal: wake up
Fri Dec 23 20:08:16 2016 -> ClamAV update process started at Fri Dec 23 20:08:16 2016
Fri Dec 23 20:08:16 2016 -> main.cvd is up to date (version: 57, sigs: 4218790, f-level: 60, builder: amishhammer)
Fri Dec 23 20:08:16 2016 -> daily.cld is up to date (version: 22765, sigs: 1152120, f-level: 63, builder: neo)
Fri Dec 23 20:08:16 2016 -> safebrowsing.cld is up to date (version: 45370, sigs: 2490012, f-level: 63, builder: google)
Fri Dec 23 20:08:16 2016 -> bytecode.cld is up to date (version: 285, sigs: 57, f-level: 63, builder: bbaker)
Fri Dec 23 20:08:16 2016 -> --------------------------------------
如您所见,我的刚刚更新。如果您想更改更新间隔,请从终端窗口运行以下命令:
sudo dpkg-reconfigure clamav-freshclam
然后只需按照提示一步步操作,就可以更改 freshclam 每天更新的次数(24 表示每小时一次):
希望这可以帮助!