Install ruby
sudo apt-get install ruby1.9.1 rubygems1.9.1
Install imagemagick
sudo apt-get install imagemagick
Tried to install rmagick
sudo gem install rmagick
Got this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1:in `'
Found this page, which pointed med to install ruby1.9.1-dev package.
sudo apt-get install ruby1.9.1-dev
Ok, trying again to install rmagick
sudo gem install rmagick
Got this error:
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.9.1 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/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/X11R6/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.
Found this question on superuser.com which pointed me to install the libmagickwand-dev-package.
sudo apt-get install libmagickwand-dev
Finally, another attempt to install rmagick
sudo gem install rmagick
Building native extensions. This could take a while...
Successfully installed rmagick-2.13.1
1 gem installed
Installing ri documentation for rmagick-2.13.1...
Updating class cache with 0 classes...
Installing RDoc documentation for rmagick-2.13.1...
Success!
Thanks alot.. it worked for me :)
ReplyDeleteI tried
ReplyDeletesudo apt-get install libmagickwand-dev
getting dependencies issuses
The following packages have unmet dependencies:
libmagickwand-dev: Depends: libmagickwand2 (= 7:6.5.7.8-1ubuntu1) but 7:6.5.7.8-1ubuntu1.2 is to be installed
Depends: libmagickcore2-extra (= 7:6.5.7.8-1ubuntu1) but 7:6.5.7.8-1ubuntu1.2 is to be installed
Depends: libmagickcore-dev (= 7:6.5.7.8-1ubuntu1) but it is not going to be installed
prasanna: Are you using ubuntu 10.04 ?
ReplyDeleteThis is a rather old post and I would suggest using RVM (https://rvm.io/) for installing ruby on ubuntu. Much less hassle than installing with ubuntu packages.