1

I am using perl Module Managerinstaller on RHEL 6 and perl version is 5.10.1

At first when I tried to install the GD module, it showed me I have some dependencies missing. After installing those dependencies I am getting the following error.

Can't load '/usr/local/lib64/perl5/auto/GD/GD.so' for module GD: libgd.so.3: 
cannot open shared object file: No such file or directory at
/usr/lib64/perl5/DynaLoader.pm line 200. at -e line 1
Compilation failed in require at -e line 1.
BEGIN failed--compilation aborted at -e line 1.

================================================================
Module GD Installation Failed..!! 
=================================================================

Output of ldd /usr/local/lib64/perl5/auto/GD/GD.so command is following :

linux-vdso.so.1 =>  (0x00007fff3ffff000)
libjpeg.so.62 => /usr/lib64/libjpeg.so.62 (0x00007f43ba4f5000)    
libz.so.1 => /lib64/libz.so.1 (0x00007f43ba2e0000)    
libm.so.6 => /lib64/libm.so.6 (0x00007f43ba05b000)    
libpng12.so.0 => /usr/lib64/libpng12.so.0 (0x00007f43b9e35000)        
libfreetype.so.6 => /usr/lib64/libfreetype.so.6 (0x00007f43b9b99000)    
libfontconfig.so.1 => /usr/lib64/libfontconfig.so.1 (0x00007f43b9962000)    
libgd.so.3 => not found     
libc.so.6 => /lib64/libc.so.6 (0x00007f43b95e3000)    
libexpat.so.1 => /lib64/libexpat.so.1 (0x00007f43b93ba000)    
/lib64/ld-linux-x86-64.so.2 (0x0000003c27400000)    
Kara
  • 6,115
  • 16
  • 50
  • 57
  • What is perlmod installer? I've never heard of it. - The error message indicates libgd.so.3 is missing. Install the package that provides this library. – daxim Jul 17 '13 at 07:06
  • What's the output of `ldd /usr/local/lib64/perl5/auto/GD/GD.so`? Is something missing here? – Slaven Rezic Jul 17 '13 at 08:16
  • If your `perlmod installer` is [this](http://sourceforge.net/projects/perlmod/), my advice is to stay away from it. It's a stupid little hack that is totally superfluous and will fail with a large percentage of cpan modules. Please use `cpan`, `cpanm` or `cpanplus`. – innaM Jul 17 '13 at 10:15
  • yes am using the same installer which you mentioned – Nishanth Lawrence Reginold Jul 17 '13 at 12:20

4 Answers4

2

Install the gd package:

yum install gd

It can be found in the rhel-6-server-rpms repository.

And please let us know what the perlmod installer is.

innaM
  • 47,505
  • 4
  • 67
  • 87
2

The GD module is already available for you in the standard package repositories.

$ repoquery -i perl-GD

Name        : perl-GD
Version     : 2.35
Release     : 2.el5
Architecture: x86_64
Size        : 443667
Packager    : Fedora Project <http://bugzilla.redhat.com/bugzilla>
Group       : Development/Libraries
URL         : http://search.cpan.org/dist/GD/
Repository  : epel
Summary     : Perl interface to the GD graphics library
Description :
This is a autoloadable interface module for GD, a popular library
for creating and manipulating PNG files.  With this library you can
create PNG images on the fly or modify existing files.

Install it with yum.

# yum install perl-GD
Dave Cross
  • 68,119
  • 3
  • 51
  • 97
1

GD needs some development packages in order for it to compile. It's been a while since I did this but I think this list is complete:

  • libgd2-perl
  • libgd2-xpm
  • libgd2-xpm-dev
  • libpng12-dev
  • libjpeg62-dev
  • libtiff4-dev

The numbers in the packages are version number. You may have to change them to get the latest version.

For Debian and derivatives: sudo apt-get install libgd2-perl ...

For RHEL: sudo yum install libgd2-perl ...

shawnhcorey
  • 3,545
  • 1
  • 15
  • 17
0

I had (almost) the same problem. '5/auto/GD/GD.so' for module GD:

libpng16.so.16: cannot open shared object file: No such file or directory at /usr/lib64/perl5/DynaLoader.pm line 200.'

Ran ldd /usr/local/lib64/perl5/auto/GD/GD.so and got:

linux-vdso.so.1 =>  (0x00007fffdefe2000)
libz.so.1 => /lib64/libz.so.1 (0x00007f6726e33000)
libm.so.6 => /lib64/libm.so.6 (0x00007f6726baf000)
libpng16.so.16 => not found
libgd.so.3 => not found
libc.so.6 => /lib64/libc.so.6 (0x00007f672681b000)
/lib64/ld-linux-x86-64.so.2 (0x00000037ff000000)

Saw that all the .so files were in /lib64.

Ran:

find / -name libpng16.so.16 2>/dev/null
fine / -name libgd.so.3 2>/dev/null

cd /lib64

sudo ln -s <fullpath_to_libpng16.so.16> libpng16.so.16
sudo ln -s <fullpath_to_libgd.so.3> libgd.so.3

Problem solved!!!

laalto
  • 150,114
  • 66
  • 286
  • 303