How to install ruby-gd

W

w wg

Hi,

I installed the ruby-gd like so:

gem install ruby-gd

[root@rj-bsd /var/www/rjinfo.com]# gem install ruby-gd
Attempting local installation of 'ruby-gd'
Local gem file not found: ruby-gd*.gem
Attempting remote installation of 'ruby-gd'
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/local/bin/ruby18
--with-gd-dir
--without-gd-dir
--with-gd-include
--without-gd-include=${gd-dir}/include
--with-gd-lib
--without-gd-lib=${gd-dir}/lib
--with-xpm
--without-xpm
--with-jpeg
--without-jpeg
--with-ttf
--without-ttf
--with-xpm
--without-xpm
--with-freetype
--without-freetype
--with-zlib
--without-zlib
--with-pnglib
--without-pnglib
--with-gdlib
--without-gdlib
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/ruby-gd-0.7.4 for inspection.
ruby extconf.rb install ruby-gd\nchecking for main() in -lz... yes
checking for main() in -lpng... yes
checking for gdImagePng() in -lgd... no


Results logged to /usr/local/lib/ruby/gems/1.8/gems/ruby-gd-0.7.4/gem_make.out



Please help me, thank you.
 
A

Axel Etzold

I installed the ruby-gd like so:
gem install ruby-gd

[root@rj-bsd /var/www/rjinfo.com]# gem install ruby-gd
Attempting local installation of 'ruby-gd'
Local gem file not found: ruby-gd*.gem
Attempting remote installation of 'ruby-gd'
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/local/bin/ruby18
--with-gd-dir
--without-gd-dir
--with-gd-include
--without-gd-include=${gd-dir}/include
--with-gd-lib
--without-gd-lib=${gd-dir}/lib
--with-xpm
--without-xpm
--with-jpeg
--without-jpeg
--with-ttf
--without-ttf
--with-xpm
--without-xpm
--with-freetype
--without-freetype
--with-zlib
--without-zlib
--with-pnglib
--without-pnglib
--with-gdlib
--without-gdlib
ERROR: While executing gem ... (RuntimeError)
ERROR: Failed to build gem native extension.
Gem files will remain installed in
/usr/local/lib/ruby/gems/1.8/gems/ruby-gd-0.7.4 for inspection.
ruby extconf.rb install ruby-gd\nchecking for main() in -lz... yes
checking for main() in -lpng... yes
checking for gdImagePng() in -lgd... no


Results logged to
/usr/local/lib/ruby/gems/1.8/gems/ruby-gd-0.7.4/gem_make.out



Please help me, thank you.

Dear WenGe,

the gd library complains that you did not install support for the
PNG graphics format.
If you didn't, check out this page for binaries or source code:

http://www.libpng.org/pub/png/libpng.html .

If you did, there is this in the installation wiki of gd:

http://www.libgd.org/FAQ#gd_keeps_s...tall_libpng_and_libjpeg._What_am_I_missing.3F

Alternatively, you could call the gem install setup process with
the flag --without-pnglib, if you are sure that you don't want PNG
graphics support.

Best regards,

Axel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,990
Messages
2,570,211
Members
46,796
Latest member
SteveBreed

Latest Threads

Top