我正在尝试使用ruby on rails在Windows上安装一个项目的clamav gem。
我使用了gem install clamav -v '0.4.1'
我一直收到这个错误:
Temporarily enhancing PATH to include DevKit... Building native extensions. This could take a while... ERROR: Error installing clamav: ERROR: Failed to build gem native extension. c:/RailsInstaller/Ruby2.0.0/bin/ruby.exe extconf.rb checking for clamav.h... 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=c:/RailsInstaller/Ruby2.0.0/bin/ruby --with-clamav-dir --without-clamav-dir --with-clamav-include --without-clamav-include=${clamav-dir}/include --with-clamav-lib --without-clamav-lib=${clamav-dir}/ Gem files will remain installed in c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/clamav-0.4.1 for inspection. Results logged to c:/RailsInstaller/Ruby2.0.0/lib/ruby/gems/2.0.0/gems/clamav-0.4.1/ext/clamav/gem_make.out
我知道RailsInstaller中的gems文件夹中没有clamav.h文件,但它从rubygems.org更新,所以我无法更改它。
答案 0 :(得分:1)
在ubuntu上,您可以使用以下命令安装libclamav-dev:
sudo apt-get install libclamav-dev