1

I've hit a roadblock installing GD with CPAN on a new server. The relevant error line is

Can't load '/usr/local/lib/perl5/auto/GD/GD.so' for module GD: /usr/local/lib/perl5/auto/GD/GD.so: undefined symbol: gdImageCreateFromGd2Ptr at /usr/lib/perl5/DynaLoader.pm line 200.

While installing submodule GD::Graph

As far as I can tell, prerequisites libraries are all installed and up to date.

Giacomo1968
  • 25,759
  • 11
  • 71
  • 103
ddyer
  • 1,792
  • 19
  • 26
  • `prerequisites libraries are all installed and up to date`, How did you ensure that these Libraries are installed? this is an issue with missing `gd` libraries from your system. Use your system's package manager to install them. – slayedbylucifer Dec 16 '13 at 04:36
  • I installed libgd and libpng using yum. & anyway, if I were missing a package of that type then CPAN would either install it or tell me to, right? I'm actually duplicating an existing system onto new hardware, so can use the old system for reference. Maybe it's skew due to incidental version upgrades. I see reference in current gd to reinstating gif format support. – ddyer Dec 16 '13 at 06:02
  • What OS flavor are you using? debian? do `apt-get install libgd2-xpm` or better yet `apt-get install libgd-gd2-perl` – Noam Rathaus Dec 16 '13 at 06:21
  • @ddyer, `if I were missing a package of that type then CPAN would either install it or tell me to, right?`, wrong, CPAN won't tell you what package you are missing, instead, it will tell you what files you are missing, then you have to install the package that contain those files using your operating systems package manager. Also, `CPAN` wont install operating system packages. It will install other CPAN modules which are dependencies, not the packages. – slayedbylucifer Dec 16 '13 at 06:26
  • It's more likely there's either a linking issue or a library mismatch than missing libraries. @nrathaus The OP already mentioned he's using `yum`. – chrsblck Dec 16 '13 at 06:37
  • He mentioned it in the comment, didn't see it @chrsblck – Noam Rathaus Dec 16 '13 at 06:40

1 Answers1

5

Why bother with CPAN. You are using yum. Make your life easy. This is a quick test I did on my RHEL 6.4 machine:

# uname -a
Linux ip-10-227-20-6 2.6.32-358.14.1.el6.x86_64 #1 SMP Mon Jun 17 15:54:20 EDT 2013 x86_64 x86_64 x86_64 GNU/Linux

# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)

# yum install perl-GDGraph.noarch

# perl -e 'use GD::Graph'
#

the yum install perl-GDGraph.noarch command will install below dependency packages:

(1/5): gd-2.0.35-11.el6.x86_64.rpm
(2/5): libXpm-3.5.10-2.el6.x86_64.rpm
(3/5): perl-GD-2.44-3.el6.x86_64.rpm
(4/5): perl-GDGraph-1.44-7.el6.noarch.rpm
(5/5): perl-GDTextUtil-0.86-15.el6.noarch.rpm

And it will install GD::Graph too :)

slayedbylucifer
  • 22,878
  • 16
  • 94
  • 123
  • This worked after an additional step. I had used "force" to install GD with CPAN. I had to install GD with yum. (still no joy) and then uninstall cpan gd using "App-pmuninstall". My problem is fixed although the underlying problem remains a mystery. Thanks. – ddyer Dec 16 '13 at 19:18