安装rmagick时出现了Ruby错误

4

当我想安装Zena时,一切都开始了。但我在安装Ruby、Gems和MySQL的不同部分时搞砸了。最终,我成功安装了Zena,但当我按照教程执行rake zena:init命令时,收到了以下信息:

ERROR:  Error installing rmagick:
    ERROR: Failed to build gem native extension.

/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:/bin:/sbin:/usr/bin:/usr/sbin:/usr/libexec

*** 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=/usr/local/bin/ruby

Gem files will remain installed in /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/local/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
Building native extensions.  This could take a while....

我希望能够删除所有内容并重新安装Ruby,以便更加正确地使用它。有人可以帮助我吗?谢谢!


2
你是否遵循了RMagick安装FAQ?特别是,你需要安装ImageMagick或类似的库。 - Jonathan Tran
3个回答

9

你正在使用Ubuntu吗?

那么尝试安装这个软件包:

sudo apt-get install libmagickwand-dev

如果这没有帮助,请尝试安装以下软件包:
sudo apt-get install build-essential ruby-dev

@Jonathan Tran,我按照你的教程链接进行了操作,当我到达安装RMAGICK时,在安装了所有上述内容(mac端口+其他内容)后,我尝试了RMAGIC安装命令,输出结果是:这里输入太长,请查看输出:http://www.andrei-klauss.ro/output.txt。 - Klauss

1

-1

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接