无法运行Freshclam

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 

它出什么问题了?

您正在运行缺少各种设置的freshclam配置文件的默认示例。

如果您运行:

 sudo dpkg-reconfigure clamav-freshclam 

它将在/etc/clamav/文件夹中创建一个新的freshclam.conf文件。

/usr/local/etc/文件夹中删除现有的freshclam.conf文件。

 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 

如果我以此为例,我会说

 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