MAC M1 or similar clamav installation process
If like me you had to install clamav and clamd on a macbook with M1 processor, this might be helpful.
brew install clamav
cd /usr/local/etc/clamav/
cp freshclam.conf.sample freshclam.conf
cp clamd.conf.sample clamd.conf
edit clamd.conf and freshclam.conf so Example is commented
freshclam
This should download the VIRUS DB
Then you should be able to run clamscan
of the repository
Then you need to be able to run clamd
when in the repo, but most probably you will get an error like this: -bash: clamd: command not found
If this is the case, it means brew didn’t install clamd properly. It is probably in sbin, and needs to be copied to bin.
Go to /usr/local
and do cd bin
and then ls
. If there clamd doest not appear you need to go back to /usr/local
then do cd sbin
and check that clamd is indeed there. Even from there if you run clamd
you get the same error. If it is like that, go back to /usr/local
And run cp sbin/clamd bin/clamd
Then if you try to run clamd you should get another error, something like that:
clamd ERROR: Please define server type (local and/or TCP)
.
If this is the case, you need to go back to editing clamd.conf
You need to find and uncomment, or simply add the following:
TCPSocket 3310
TCPAddr localhost
Then you should finally be able to run clamd
, clamdtop
to check its status and clamdscan
inside the repo, so that Clamby gem can work properly.
Good luck.
Homebrew now installs the conf files at
/opt/homebrew/etc/clamav/
You can also get
clamd
to run by addingexport PATH="/opt/homebrew/sbin:$PATH"
to your~/.zshenv
or~/.bash_profile