Drew
Upgrading ClamAV is very straight forward. We do not have to redo any configuration files. All we have to do is remove the previous version and install the new one.
The first thing to do is get the latest source from http://www.clamav.net.
Now we configure our build exactly the same as when we first installed clamav.
You can now build with:
make check
If all has gone well, we are ready to remove the previous install of clamav. Before we do that however we should shut down the clamd process and the freshclam process we have running for the mail server.
sudo launchctl unload /System/Library/LaunchDaemons/com.diymacserver.clamav.plist
We now have to remove the libraries and binaries of the previous install. We will not however removed our virus definitions database or the configuration files. Once done we will install the new version.
sudo make install
Now that we have replaced all the binaries and libraries, we should run freshclam once by hand to make sure everything is ok before restarting the daemon processes for the email server.
If all is well, the last thing to do is restart the daemon processes with these two commands :
sudo launchctl load /System/Library/LaunchDaemons/com.diymacserver.clamav.plist
All done.



Comments
12:46 pm
Building on MacMini G4 with Leopard, I got this error:
checking for gcc bug PR28045… configure: error: your compiler has gcc PR28045 bug, use a different compiler, see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28045
3:01 pm
@Markis, have you got the latest version of XCode?
12:22 pm
It worked after a long search and download of XCode 3.1.4 since 3.2.x only works with Snow Leopard.
12:06 am
In order to have clamav run in 64-bit mode, the configure command needs to be preceeded by CFLAGS and CXXFLAGS commands:
CFLAGS=”-arch x86_64″ CXXFLAGS=”-arch x86_64″ ./configure –enable-llvm –enable-clamdtop –with-user=_clamav –with-group=_clamav –sysconfdir=/etc/clamav
8:19 pm
I tried this on 10.6.8 and uninstall doesn’t seem to work. Getting stuck there. I get this error:
make[2]: Nothing to be done for `uninstall’.
( cd ‘/usr/local/include’ && rm -f clamav.h )
/bin/sh: line 0: cd: /usr/local/include: No such file or directory
make[2]: *** [uninstall-includeHEADERS] Error 1
make[1]: *** [uninstall-recursive] Error 1
make: *** [uninstall-recursive] Error 1
This is a stock OS-X server install with no customization. I installed the OS and immediately updated it to 10.6.8 including the latest Xcode. Then attempted the Clamav update as described above (except changing the unload to match my file names – org.clamav.freshclam.plist and org.clamav.clamd.plist) Xcode is 3.2.6.
What am I doing wrong?
11:30 pm
ClamAV is not installed by default on OS X. If you tried to uninstall ClamAV on a stock install, it will give you this error because it is trying to uninstall a program that is not present.
You need to install software before you can update it. Please see the Install instructions here ClamAV