Ruby:在 Ubuntu 上安装 rmagick [英] Ruby: Installing rmagick on Ubuntu
问题描述
我正在尝试在 Ubuntu 10.04 上安装 RMagick.看了这里但没有任何乐趣.我什至从源代码编译并安装了 ImageMagick,但是 here 的说明仍然没有帮助我当我尝试使用 RubyGems 安装 RMagick 时.我收到此错误:
I'm trying to get RMagick setup on Ubuntu 10.04. Looked here but had no joy. I even compiled and installed ImageMagick from source, but the instructions here still didn't help me when I try to install RMagick using RubyGems. I got this error:
carcher@carcher-laptop:~/Code/temp/RMagick-2.13.1$ sudo gem install rmagick
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.13.1/ext/RMagick/gem_make.out
carcher@carcher-laptop:~/Code/temp/RMagick-2.13.1$
这一切是什么意思?:) 我是 Ruby 和 RubyGems 的新手,所以请保持温和.我的设置如下:
What does it all mean? :) I'm new to Ruby and RubyGems so please be gentle. My setup is as follows:
Ruby: 1.8.7
RubyGems: 1.3.7
我几乎没有想法(而且也很累!).我厌倦了使用上面的链接从源代码编译 RMagick 但它失败了,因为没有 ./configure
脚本 :(
I'm pretty much out of ideas (and tired too!). I tired to compile RMagick from source using the link above but it failed as there was no ./configure
script :(
感谢所有帮助!
推荐答案
安装包 imagemagick
和 libmagickwand-dev
(或 libmagick9-dev
>).然后您应该能够安装 Rmagick Gem.
Install the packages imagemagick
and libmagickwand-dev
(or libmagick9-dev
). You should then be able to install the Rmagick Gem.
sudo apt-get install imagemagick libmagickwand-dev
如果没有,则您缺少与 ruby 相关的开发包,例如 build-essential
和 ruby1.8-dev
.如果是这种情况,Google 中的通用ubuntu install ruby 1.8"查询应该可以解决您的问题.
If not, you are missing ruby related development packages like build-essential
and ruby1.8-dev
. If that's the case, a generic "ubuntu install ruby 1.8" query in google should sort you out.
这篇关于Ruby:在 Ubuntu 上安装 rmagick的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!