root@msy-Inspiron-One-2020:/home/msy# freshclam
ERROR: Missing argument for option at line 33
ERROR: Can't open/parse the config file /usr/local/etc/freshclam.conf
这是/usr/local/etc/freshclam.conf
:
#Example
DatabaseDirectory /var/lib/clamav
##
## Example config file for freshclam
## Please read the clamav.conf(5) manual before editing this file.
## This file may be optionally merged with clamav.conf.
##
# You can change the default database directory here.
#DatabaseDirectory /var/lib/clamav
DatabaseDirectory /usr/local/clamav/share/clamav
# Path to the log file (make sure it has proper permissions)
UpdateLogFile /var/log/freshclam.log
# Enable verbose logging.
LogVerbose
# Use system logger (can work together with UpdateLogFile).
LogSyslog
# By default when freshclam is started by root it drops privileges and
# switches to the "clamav" user. You can change this behaviour here.
#DatabaseOwner clamav
# The main database mirror is database.clamav.net (this is a round-robin
# DNS that points to many mirrors on the world) and in most cases you
# SHOULD NOT change it.
DatabaseMirror database.clamav.net
# How many attempts to make before giving up.
MaxAttempts 3
# How often check for a new database. We suggest checking for it every
# two hours.
Checks 12
# Proxy settings
#HTTPProxyServer myproxy.com
#HTTPProxyPort 1234
#HTTPProxyUsername myusername
#HTTPProxyPassword mypass
# Send the RELOAD command to clamd.
#NotifyClamd [/optional/config/file/path]
# Run command after database update.
#OnUpdateExecute command
# Run command if database update failed.
#OnErrorExecute command
它出什么问题了?
答案1
您正在运行缺少各种设置的 freshclam 配置文件的默认示例。
如果你运行:
sudo dpkg-reconfigure clamav-freshclam
它将在/etc/clamav/
文件夹中创建一个新的 freshclam.conf 文件。
从文件夹中删除现有的 freshclam.conf 文件/usr/local/etc/
。
sudo rm -f /usr/local/etc/freshclam.conf
然后创建指向新文件的链接,以便如果您再次运行它,conf 文件将保持更新。
sudo ln -s /etc/clamav/freshclam.conf /usr/local/etc/freshclam.conf
然后运行freshclam进行更新。
sudo freshclam
您可能会收到此错误:freshclam: error while loading shared libraries: libclamav.so.7: cannot open shared object file: No such file or directory
,可以通过运行以下命令修复:
sudo apt-get install --reinstall libclamav6
或者对于 Ubuntu 16.04:
sudo apt-get install --reinstall libclamav7
或者,我还没有尝试过这个,但据说它适用于任何发行版:
sudo ldconfig
答案2
如果我以此为例我会说
LogVerbose
不是有效命令,后面必须跟“是”或“否”。链接中说:
# Use system logger (can work together with LogFile).
# Default: no
LogSyslog yes
# Specify the type of syslog messages - please refer to 'man syslog'
# for facility names.
# Default: LOG_LOCAL6
#LogFacility LOG_MAIL
# Enable verbose logging.
# Default: no
#LogVerbose yes
LogSysLog 也是如此。这可以解释您的通知:
ERROR: Missing argument for option at line 33