Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Unable to run clamav because I can't update the virus définition #1900
Because clamxav became comercial and close source, I try to install clamav using hambrew
When I run clamscan I get this :
----------- SCAN SUMMARY -----------
When I run freshclam I get this
Thanks for your support
Yeah, this isn't our most user-friendly formula.
First, note the caveat message you get when initially installing:
So what is it talking about regarding "example conf files at /usr/local/etc/clamav/"?
Note that configuration files with the extension
Let's see what happens if we ignore the conf files issue and just try to run clamscan:
Is that telling the truth?
Yep, nothing there. So where do we get them?
Note that Homebrew doesn't provide any non-Homebrew-specific documentation, so now would be a good time to visit https://www.clamav.net/. If you click "download" or visit "https://www.clamav.net/downloads" directly, you'll see a closed tab with the name "Virus Database." If you click that, you'll see:
But let's assume that we're in a rush, and get the point that to get the database files we need to run
OK, well that should make sense, since the only files in /usr/local/etc/clamav/ were clamd.conf.sample freshclam.conf.sample as we saw above.
It's looking for
Well at least we got a different error that time.
It's telling us we actually have to edit freshclam.conf and that the sample wasn't sufficient without any modifications. Let's see what's wrong. If you open freshclam.conf in a text editor, you'll see at the top
OK, so it seems to be telling us how to fix it: "Comment or remove the line below." That must be referring to the line that just says "Example" so let's delete that line and save the file.
Now what happens if we run
Well that's much better! But did the database files end up in the right place?
Yes, that looks good.
So can we actually run
Yes looks good. (And probably best to run it with
So it seems clamd.conf was not actually mandatory but freshclam.conf was, and freshclam.conf required edits to the sample version to actually be functional.
And now would be a good time to consult the upstream documentation for further information.