可能重复:
ImageMagick / RMagick - Can't install RMagick 2.13.1. Can't find Magick-config
当我尝试运行我的开发控制台(MAC OS X / Snow Leopard)时,我收到以下错误。有谁知道解决方案?
/usr/local/bin/ruby extconf.rb
checking for Ruby version >= 1.8.5... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.13.1. Can't find Magick-config in .:/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
*** 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.
答案 0 :(得分:16)
我通过安装libmagickwand-dev
apt-get install libmagickwand-dev
gem install rmagick
之前,我收到了以下错误(即使在安装libmagick9-dev
之后):
apt-get install libmagick9-dev
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libmagick9-dev is a virtual package provided by:
libmagickwand-dev 7:6.4.5.4.dfsg1-1ubuntu3.1
You should explicitly select one to install.
E: Package libmagick9-dev has no installation candidate
答案 1 :(得分:14)
似乎这个问题在安装RMagick gem时很常见......我遇到了同样的问题,我在同一个站点找到了解决方案。请点击here链接。
解决方案:
sudo apt-get install libmagick9-dev
答案 2 :(得分:0)
我遇到了类似的问题,因为我没有包含特定gem的库。检查你的宝石,看看它们是否依赖于图书馆宝石总是这样做。
config.gem gem_name, :lib => 'path_of_your_library'