Setting up ClamAV on macOS
My preferred anti-virus system is ClamAV and I had trouble getting it running on macOS recently. Here’s how I got it going so if you’re running to the same issue, this should solve your problem.
I will go through the steps I took and problems encountered. This article will take you less than three minutes to read.
Installing ClamAV on macOS
To get ClamAV running on macOS, run: brew install clamav
Thanks to brew
, open source software like ClamAV can run on multiple
platforms.
Running ClamAV
Normally, I would just run the application directly, in this case:
clamav
, but that does not exist. The main application is: clamscan
Hmm. What is going on here?
After looking up the man page, man clamscan
, one related package is
freshclam
, that has a description:
freshclam - update virus databases
Aah - let’s run freshclam
to update the definition!
Well, there’s no such file, or where do I get it? Is there a sample somewhere?
Getting freshclam.conf
Well, it turns out I missed a critical line in the brew
install, which was:
To finish installation & run clamav you will need to edit the example conf files at /usr/local/etc/clamav/
🤦♂️ whoops! I didn’t even look (and only when writing up this article, I noticed it).
Let’s make the freshclam.conf
file by running command:
Change the following in the file from:
To:
Update Database
Running the freshclam
application again results in:
Great! Now macOS can scan virus too!
Solution Source
I can’t take credit for everything, I found this github comment that basically describes the solution I presented.
I have this article as a way for me to remember but also remind myself of apps that are better on Linux than macOS.
Conclusion
Getting ClamAV running on macOS isn’t that hard, but I was close to giving up!.
I love using open source software and macOS. As macOS is UNIX based, almost all open source software works on macOS.
There are times where just using Linux to run open source software is a better experience than macOS. ClamAV is one of those times.
Hopefully, this post has helped you from giving up on open source software!