Linux 安装 RMagick Gem
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4899376/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Installing RMagick Gem
提问by Joern Akkermann
I just wanted to gem install rmagick
我只是想 gem install rmagick
and got this:
得到了这个:
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
ImageMagick and libmagickwand-dev is already installed.
ImageMagick 和 libmagickwand-dev 已经安装。
Using Ubuntu Linux.
使用 Ubuntu Linux。
Any help?
有什么帮助吗?
Yours, Joern.
你的,乔恩。
采纳答案by c2h2
use rvm to install ruby (preferred) or use apt-get install ruby ruby-dev
使用 rvm 安装 ruby(首选)或使用 apt-get install ruby ruby-dev
aptitude install build-essential imagemagick libmagickcore-dev libmagickwand-dev
gem install rmagick
--Edit 1--
--编辑1--
sudo apt-get install ruby-dev
You will also need ruby-dev (or ruby-full) for successfully compiling the RMagick before gem install.
在安装 gem 之前,您还需要 ruby-dev(或 ruby-full)才能成功编译 RMagick。
回答by Jigar Bhatt
sudo apt-get install imagemagick libmagickwand-dev
sudo apt-get install imagemagick libmagickwand-dev
gem install rmagick
宝石安装 rmagick
or
或者
in gem file
在 gem 文件中
gem 'rmagick'
宝石 'rmagick'
then run
然后运行
bundle install
捆绑安装