After figuring out (with some help) how to get RMagick running on debian, I had to get it running on my development notebook - a MacBook with Mac OSX 10.4 (Intel).
To keep things simple I really like to use MacPorts to install new software onto the Mac.
So here we go:
1. Install ImageMagick with MacPorts (this takes some time - get a coffee NOW):
sudo port instll ImageMagick +graphviz +gs +jbig +jpeg2+lcms +mpeg +nox11 +wmf
MacPorts just installed ImageMagick in /opt/local/lib. Mac OSX includes by default /lib, /usr/lib, and /usr/local/lib as library path.
2. All we have to do, is to "show" gem where we installed imagemagick:
export LD_LIBRARY_PATH=/opt/local/lib
3. Now we can install RMagick on the Mac without any problems:
sudo gem install RMagick
Now check that it did really worked:
irb -rubygems -r RMagick
(now enter) puts Magick::Long_version
Done :)
BTW: I don’t get - After the installation, I started a completely new terminal and check it again:
irb -rubygems -r RMagick
(now enter) puts Magick::Long_version
And it works – but this time the LD_LIBRARY_PATH variable is not set!
Thursday, June 14, 2007
Getting RMagick installed on a debian machine
After installing several packages with debian apt, I thought I just could do:
sudo gem install rmagick
But what I got was this:
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby gem_extconf.rb install rmagick
sh configure
Configuring RMagick 1.15.7
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ruby... /usr/bin/ruby
checking for Magick-config... no
checking for GraphicsMagick-config... no
configure: error: Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.
RMagick configuration failed with status 1.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.7/gem_make.out
Not what I expected. Finally I decided to give the development version of imagemagick a try - it still didn't help. So I fired you firefox and search google for a solution and found this wonderful blog entry:
Quick Tip: Install Rmagick Gem on Ubuntu
And I did exactly what Vince W. wrote:
sudo apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8
after that:
sudo apt-get install libmagick9-dev ruby1.8-dev
and tried again:
sudo gem install rmagick
Guess what - it just worked!
Now check that it really works:
irb -rubygems -r RMagick
(then enter) puts Magick::Long_version
That's it! My thanks go to Vince W.
sudo gem install rmagick
But what I got was this:
Building native extensions. This could take a while...
ERROR: While executing gem ... (Gem::Installer::ExtensionBuildError)
ERROR: Failed to build gem native extension.
ruby gem_extconf.rb install rmagick
sh configure
Configuring RMagick 1.15.7
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for ruby... /usr/bin/ruby
checking for Magick-config... no
checking for GraphicsMagick-config... no
configure: error: Can't install RMagick. Can't find Magick-config or GraphicsMagick-config program.
RMagick configuration failed with status 1.
Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.7 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-1.15.7/gem_make.out
Not what I expected. Finally I decided to give the development version of imagemagick a try - it still didn't help. So I fired you firefox and search google for a solution and found this wonderful blog entry:
Quick Tip: Install Rmagick Gem on Ubuntu
And I did exactly what Vince W. wrote:
sudo apt-get remove --purge librmagick-ruby-doc librmagick-ruby1.8
after that:
sudo apt-get install libmagick9-dev ruby1.8-dev
and tried again:
sudo gem install rmagick
Guess what - it just worked!
Now check that it really works:
irb -rubygems -r RMagick
(then enter) puts Magick::Long_version
That's it! My thanks go to Vince W.
Subscribe to:
Posts (Atom)