Skip to content

Instantly share code, notes, and snippets.

@gagarine
Last active June 7, 2023 07:54
Show Gist options
  • Save gagarine/9168c1b7e4b5f55cb3254582e30d808e to your computer and use it in GitHub Desktop.
Save gagarine/9168c1b7e4b5f55cb3254582e30d808e to your computer and use it in GitHub Desktop.
Howto Install clamav on OSX with brew

Howto Install clamav on OSX with brew

Note: on legacy intel system the path may be /usr/local/etc/clamav instead of /opt/homebrew/etc/clamav/

$ brew install clamav
$ cd /opt/homebrew/etc/clamav/
$ cp freshclam.conf.sample freshclam.conf

Open freshclam.conf and comment the "Example" (in new version it may be "FooClam") line:

# Comment or remove the line below.
# Example

Update database:

 $ freshclam

Run scan on all your files:

$ clamscan -r --bell -i /
@andresv17
Copy link

I am having problems to stop the ClamAV service in macOs 10.15.4. The process is running as you can see.

** 0 119 1 0 4:09PM ?? 0:33.27 /usr/local/sbin/clamd --foreground**

But when I try top stop it I get this error:

$ /usr/local/sbin/clamd stop
ERROR: LOCAL: Socket file /usr/local/var/run/clamav/clamd.sock is in use by another process.

Do I have to change something in the socket file?

@kunthar
Copy link

kunthar commented Feb 6, 2021

do yourself a favor. switch to macports.

@paulterinho
Copy link

paulterinho commented Feb 25, 2021

@gagarine: Great instructions. Thanks so much for posting this. It's working great for me.

@tomasi-o
Copy link

tomasi-o commented May 28, 2021

do yourself a favor. switch to macports.

please don't. Installation via homebrew was so much easier than via macports where I had to chown multiple files to get clamav up and running.

@gagarine
Copy link
Author

@tomasi-o actually, I agree with kunthar, macports is much more stable as a package manager. A particular port/package may have a bug, but the package manager is better for me. I do not use brew anymore.

@Mutation77
Copy link

Thanks @gagarine

@Jarrid
Copy link

Jarrid commented Jul 29, 2022

minor update - the clam conf files are now located at /opt/homebrew/etc/clamav/ after installing with homebrew.

@nyambayar1231
Copy link

do you guys find the socket file that should be generated after installing clamav. I can not find one. help me :)

@pkneebal
Copy link

This worked!!!!!!!!!!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment