Closed9

clamav の設定

tkttkt
 tkt@laptop: ~
$ brew install clamav
 tkt@laptop: ~
$ brew upgrade clamav
Warning: clamav 0.105.1 already installed
tkt@laptop: ~
$ freshclam
ERROR: Can't open/parse the config file /opt/homebrew/etc/clamav/freshclam.conf
tkt@laptop: ~
$ clamscan --recursive --infected ~/ > ~/clamscanlog.txt
LibClamAV Error: cl_load(): No such file or directory: /opt/homebrew/Cellar/clamav/0.105.1/share/clamav
ERROR: Can't get file statu
tkttkt

brew で入れたから、path がうまくいいかんじになってないとか?

tkttkt
$ ls /opt/homebrew/etc/clamav/
clamd.conf.sample     freshclam.conf.sample

sample しかないや

tkttkt
tkt@laptop: ~
$ clamconf -g freshclam.conf > freshclam.conf
clamconf -g clamd.conf > clamd.conf
clamconf -g clamav-milter.conf > clamav-milter.conf
tkt@laptop: ~
$ freshclam
ERROR: Can't open/parse the config file /opt/homebrew/etc/clamav/freshclam.conf
tkt@laptop: ~
$ ls /opt/homebrew/etc/clamav/
clamd.conf.sample     freshclam.conf.sample
tkt@laptop: ~
$ ls
Applications       Documents          Library            Music              Public             clamd.conf         freshclam.conf
Desktop            Downloads          Movies             Pictures           clamav-milter.conf clamscanlog.txt    projects
tkt@laptop: ~
$ cd /opt/homebrew/etc/clamav/
tkt@laptop: /opt/homebrew/etc/clamav on stable
$ clamconf -g freshclam.conf > freshclam.conf
clamconf -g clamd.conf > clamd.conf
clamconf -g clamav-milter.conf > clamav-milter.conf
tkt@laptop: /opt/homebrew/etc/clamav on stable
$ ls
clamav-milter.conf    clamd.conf            clamd.conf.sample     freshclam.conf        freshclam.conf.sample
tkt@laptop: /opt/homebrew/etc/clamav on stable
tkttkt
tkt@laptop: /opt/homebrew/etc/clamav on stable
$ freshclam
ERROR: Please edit the example config file /opt/homebrew/etc/clamav/freshclam.conf
ERROR: Can't open/parse the config file /opt/homebrew/etc/clamav/freshclam.conf
tkttkt
tkt@laptop: /opt/homebrew/etc/clamav on stable
$ vi freshclam.conf

Example を外す

$ freshclam
ERROR: No DatabaseMirror or PrivateMirror servers set in freshclam config file.
ERROR: Unable to find DatabaseMirror or PrivateMirror option(s) that specify database server FQDNs.

DatabaseMirror のコメントを外す

tkttkt
tkt@laptop: /opt/homebrew/etc/clamav on stable
$ freshclam
Creating missing database directory: /opt/homebrew/Cellar/clamav/0.105.1/share/clamav
ClamAV update process started at Mon Aug  1 14:04:03 2022
daily database available for download (remote version: 26615)
Time:    5.8s, ETA:    0.0s [========================>]   56.54MiB/56.54MiB
Testing database: '/opt/homebrew/Cellar/clamav/0.105.1/share/clamav/tmp.f20f11d85c/clamav-87a52a5a87f00d1d9d5c256efe0388d4.tmp-daily.cvd' ...
Database test passed.
daily.cvd updated (version: 26615, sigs: 1992518, f-level: 90, builder: raynman)
main database available for download (remote version: 62)
Time:   16.2s, ETA:    0.0s [========================>]  162.58MiB/162.58MiB
Testing database: '/opt/homebrew/Cellar/clamav/0.105.1/share/clamav/tmp.f20f11d85c/clamav-4e8a59f2c34c1bf5dcd43f2bba10c0fb.tmp-main.cvd' ...
Database test passed.
main.cvd updated (version: 62, sigs: 6647427, f-level: 90, builder: sigmgr)
bytecode database available for download (remote version: 333)
Time:    0.1s, ETA:    0.0s [========================>]  286.79KiB/286.79KiB
Testing database: '/opt/homebrew/Cellar/clamav/0.105.1/share/clamav/tmp.f20f11d85c/clamav-e6d9de444a7f0c549e87164890727cb0.tmp-bytecode.cvd' ...
Database test passed.
bytecode.cvd updated (version: 333, sigs: 92, f-level: 63, builder: awillia2)
このスクラップは2022/08/11にクローズされました