jfall123

Well-Known Member
Oct 31, 2005
55
2
158
I've been trying to install rmagick via ruby and just can't seem to get it to work.

I installed through the cPanel gem installer and got this error:

Installing "rmagick" Ruby Gem

Need to update 12 gems from http://gems.rubyforge.org
............
complete
Building native extensions. This could take a while...
*** 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/bin/ruby

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /home/trinity/ruby/gems/gems/rmagick-2.0.0 for inspection.


Results logged to /home/xxxxxxx/ruby/gems/gems/rmagick-2.0.0/ext/RMagick/gem_make.out

The gem_make.out file is blank, but here is what is in the mkmf.log:

checking for Ruby version >= 1.8.2... -------------------- yes

--------------------

find_executable: checking for Magick-config... -------------------- yes

--------------------

checking for ImageMagick version >= 6.3.0... -------------------- yes

--------------------

checking for HDRI disabled version of ImageMagick... -------------------- yes

--------------------

have_header: checking for sys/types.h... -------------------- no

"gcc -E -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/include -g -O2 -Wall -W -pthread conftest.c -o conftest.i"
checked program was:
/* begin */
#include <sys/types.h>
/* end */

--------------------

have_header: checking for magick/MagickCore.h... -------------------- no

"gcc -E -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/include -g -O2 -Wall -W -pthread conftest.c -o conftest.i"
checked program was:
/* begin */
#include <magick/cd>
/* end */

--------------------

Can't install RMagick 2.0.0. Can't find MagickCore.h.


however, both of these header files exist in /usr/include

-rw-r--r-- 1 root root 5494 Jan 1 08:57 /usr/include/magick/MagickCore.h
-rw-r--r-- 1 root root 6658 Jun 12 2007 /usr/include/sys/types.h
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
944
28
178
I'm getting a different error on same module....

INFO: `gem install -y` is now default and will be removed
INFO: use --ignore-dependencies to install only the gems you list
Bulk updating Gem source index for: http://gems.rubyforge.org/
Building native extensions. This could take a while...
ERROR: Error installing rmagick:
ERROR: Failed to build gem native extension.

/usr/bin/ruby extconf.rb install -y rmagick
checking for Ruby version >= 1.8.2... yes
checking for gcc... yes
checking for Magick-config... no
Can't install RMagick 2.5.0. Can't find Magick-config in /usr/local/jdk/bin:/usr/kerberos/sbin:/usr/kerberos/bin:/usr/lib/courier-imap/sbin:/usr/lib/courier-imap/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin:/opt/bin:/usr/local/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.

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/bin/ruby


Gem files will remain installed in /usr/lib/ruby/gems/1.8/gems/rmagick-2.5.0 for inspection.
Results logged to /usr/lib/ruby/gems/1.8/gems/rmagick-2.5.0/ext/RMagick/gem_make.out
 

4u123

Well-Known Member
PartnerNOC
Jan 2, 2006
944
28
178
If I remember correctly, this happens because the compilers tweak is enabled in the security section of WHM or you have specifically restricted access to the compilers yourself.
 

blahrus

Member
PartnerNOC
Jul 18, 2005
6
0
151
I am having the same issue and I am trying to install the gem as root. Anyone have any luck?

Clint
 

Ghulam Yaseen

Well-Known Member
Mar 14, 2008
49
0
56
Karachi,Pakistan
linux thirst

Hello :),

wget http://rubyforge.org/frs/download.php/18421/ruby-1.8.6.tar.gz
tar -xvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
apt-get install build-essential
./configure
make test
make
sudo make install
ruby -v (# == ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux])
irb (# make sure irb works)

Then
wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
tar -xvzf rubygems-0.9.0.tgz
cd rubygems-0.9.0
ruby setup.rb
gem install rails
---------------------
after this please follow this

--> wget http://ftp.surfnet.nl/pub/ImageMagick/ImageMagick-6.3.6-5.tar.gz
--> ./configure --disable-static --without-magick-plus-plus --with-quantum-depth=8
--> make
--> make install
--> /scripts/checkimagemagick
--> convert
-----------
--> wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
--> tar -zxvf rubygems-0.9.0.tgz
--> cd rubygems-0.9.0
--> ruby setup.rb
--> gem install rails (ignore if this gives error)
------------
Now we will install RMAGICK

--> wget http://files.rubyforge.mmmultiworks.com/rmagick/RMagick-1.15.11.tar.gz
--> tar -zxvf RMagick-1.15.11.tar.gz
--> cd RMagick-1.15.11
--> ./configure
--> export LD_LIBRARY_PATH=/usr/local/lib
--> echo $LD_LIBRARY_PATH
--> make
--> make install
--> ruby /script/console

If there is still some issue, please let me know:cool:


I've been trying to install rmagick via ruby and just can't seem to get it to work.

I installed through the cPanel gem installer and got this error:

Installing "rmagick" Ruby Gem

Need to update 12 gems from http://gems.rubyforge.org
............
complete
Building native extensions. This could take a while...
*** 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/bin/ruby

ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in /home/trinity/ruby/gems/gems/rmagick-2.0.0 for inspection.


Results logged to /home/xxxxxxx/ruby/gems/gems/rmagick-2.0.0/ext/RMagick/gem_make.out

The gem_make.out file is blank, but here is what is in the mkmf.log:

checking for Ruby version >= 1.8.2... -------------------- yes

--------------------

find_executable: checking for Magick-config... -------------------- yes

--------------------

checking for ImageMagick version >= 6.3.0... -------------------- yes

--------------------

checking for HDRI disabled version of ImageMagick... -------------------- yes

--------------------

have_header: checking for sys/types.h... -------------------- no

"gcc -E -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/include -g -O2 -Wall -W -pthread conftest.c -o conftest.i"
checked program was:
/* begin */
#include <sys/types.h>
/* end */

--------------------

have_header: checking for magick/MagickCore.h... -------------------- no

"gcc -E -I. -I/usr/lib/ruby/1.8/i686-linux -I/usr/include -g -O2 -Wall -W -pthread conftest.c -o conftest.i"
checked program was:
/* begin */
#include <magick/cd>
/* end */

--------------------

Can't install RMagick 2.0.0. Can't find MagickCore.h.


however, both of these header files exist in /usr/include

-rw-r--r-- 1 root root 5494 Jan 1 08:57 /usr/include/magick/MagickCore.h
-rw-r--r-- 1 root root 6658 Jun 12 2007 /usr/include/sys/types.h
 

blahrus

Member
PartnerNOC
Jul 18, 2005
6
0
151
Hello :),

wget http://rubyforge.org/frs/download.php/18421/ruby-1.8.6.tar.gz
tar -xvf ruby-1.8.6.tar.gz
cd ruby-1.8.6
apt-get install build-essential
./configure
make test
make
sudo make install
ruby -v (# == ruby 1.8.6 (2007-03-13 patchlevel 0) [x86_64-linux])
irb (# make sure irb works)

Then
wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
tar -xvzf rubygems-0.9.0.tgz
cd rubygems-0.9.0
ruby setup.rb
gem install rails
---------------------
after this please follow this

--> wget http://ftp.surfnet.nl/pub/ImageMagick/ImageMagick-6.3.6-5.tar.gz
--> ./configure --disable-static --without-magick-plus-plus --with-quantum-depth=8
--> make
--> make install
--> /scripts/checkimagemagick
--> convert
-----------
--> wget http://rubyforge.org/frs/download.php/11289/rubygems-0.9.0.tgz
--> tar -zxvf rubygems-0.9.0.tgz
--> cd rubygems-0.9.0
--> ruby setup.rb
--> gem install rails (ignore if this gives error)
------------
Now we will install RMAGICK

--> wget http://files.rubyforge.mmmultiworks.com/rmagick/RMagick-1.15.11.tar.gz
--> tar -zxvf RMagick-1.15.11.tar.gz
--> cd RMagick-1.15.11
--> ./configure
--> export LD_LIBRARY_PATH=/usr/local/lib
--> echo $LD_LIBRARY_PATH
--> make
--> make install
--> ruby /script/console

If there is still some issue, please let me know:cool:
How does running through this effect the installed version for cpanel?