Created
February 2, 2012 17:54
-
-
Save anarchivist/1724852 to your computer and use it in GitHub Desktop.
Installing clamav gem on Mac OS X with Homebrew-installed clamav
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ env ARCHFLAGS='-arch x86_64' gem install clamav | |
Building native extensions. This could take a while... | |
ERROR: Error installing clamav: | |
ERROR: Failed to build gem native extension. | |
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb | |
checking for clamav.h... yes | |
checking for cl_engine_compile() in -lclamav... no | |
*** extconf.rb failed *** | |
Could not create Makefile due to some reason, probably lack of | |
necessary libraries and/or headers. Check the mkmf.log file for more | |
details. You may need configuration options. | |
Provided configuration options: | |
--with-opt-dir | |
--without-opt-dir | |
--with-opt-include | |
--without-opt-include=${opt-dir}/include | |
--with-opt-lib | |
--without-opt-lib=${opt-dir}/lib | |
--with-make-prog | |
--without-make-prog | |
--srcdir=. | |
--curdir | |
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby | |
--with-clamav-dir | |
--without-clamav-dir | |
--with-clamav-include=${clamav-dir}/include | |
--with-clamav-lib=${clamav-dir}/lib | |
--with-clamavlib | |
--without-clamavlib | |
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/clamav-0.4.1 for inspection. | |
Results logged to /Library/Ruby/Gems/1.8/gems/clamav-0.4.1/ext/clamav/gem_make.out | |
$ env ARCHFLAGS='-arch x86_64' gem install clamav -- --with-clamav-include=/usr/local/Cellar/clamav/0.97.3/include --with-clamav-lib=/usr/local/Cellar/clamav/0.97.3/lib/x86_64/ | |
Building native extensions. This could take a while... | |
Successfully installed clamav-0.4.1 | |
1 gem installed | |
Installing ri documentation for clamav-0.4.1... | |
Building YARD (yri) index for clamav-0.4.1... | |
Installing RDoc documentation for clamav-0.4.1... | |
$ irb | |
>> require 'clamav' | |
=> true | |
>> a = ClamAV.instance | |
=> #<ClamAV:0x1010e1288> | |
>> a.loaddb | |
=> false | |
>> a.scanfile('/tmp/eicar.com') | |
=> "Eicar-Test-Signature" | |
>> a.scanfile('/tmp/l') | |
=> 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I need to ensure: