last_reso has asked for the wisdom of the Perl Monks concerning the following question:

Although I successfully installed GD on Windows using Strawberry, I have spent many hours trying to install the Perl module GD on Opensuse with no success. I have followed tutorials, manually installed, installed with CPAN, CPANM, tried older versions, went through YAST2 ... still nothing. I am new to linux and Perl, so please bear with me. Here is the output when I try to run circos:

missing GD error Can't locate loadable object for module GD in @INC (@INC conta +ins: /home/admin/bin/circos/bin/lib /home/admin/bin/circos/bin/../lib + /home/admin/bin/circos/bin /home/Downloads/GD-2.56 /usr/lib/perl5/si +te_perl/5.20.1/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.2 +0.1 /usr/lib/perl5/vendor_perl/5.20.1/x86_64-linux-thread-multi /usr/ +lib/perl5/vendor_perl/5.20.1 /usr/lib/perl5/5.20.1/x86_64-linux-threa +d-multi /usr/lib/perl5/5.20.1 /usr/lib/perl5/site_perl .) at (eval 24 +) line 1.Compilation failed in require at (eval 24) line 1. missing GD::Polyline error Attempt to reload GD.pm aborted.Compilation failed in require +at /usr/lib/perl5/site_perl/5.20.1/x86_64-linux-thread-multi/GD/Polyl +ine.pm line 45.

and here is the output when I try Makefile.PL:

** WARNING: found gd.h header file in /usr/local/include/gd.h, but it +is expected at /usr/include/gd.h. This may cause compile errors! ** ** Possible problems found **

issues with make:

Can't write-open blib/man1/bdf2gdfont.pl.1: Permission denied at /usr/ +lib/perl5/5.20.1/ExtUtils/Command/MM.pm line 145. Makefile:450: recipe for target 'manifypods' failed make: *** [manifypods] Error 13

cpan thinks GD is installed, but running bin/circos -modules shows it isn't...

Replies are listed 'Best First'.
Re: GD and GD:Polyline
by marinersk (Priest) on Jun 18, 2015 at 19:15 UTC

    Can't write-open blib/man1/bdf2gdfont.pl.1: Permission denied

    Seems to me you have a permissions issue -- time for some chmodaction before trying makeagain?

Re: GD and GD:Polyline
by Anonymous Monk on Jun 19, 2015 at 08:37 UTC

    GD is written in XS, which means it has to be compiled and linked to a foreign library, and you seem to have installed libgd manually instead of using your package manager to do that.

    You probably can still fix it by installing perl-GD from the openSUSE repository: http://software.opensuse.org/package/perl-GD

    The next time you need to compile a module which depends on a library make sure you have installed the library AND the headers for it from your package manager (the headers - "development files" - usually come in a separate package called <something>-devel-<version>-<arch>.rpm). In your case, the library package is called libgd3 and the headers are inside the gd-devel package.

      Thank you both for your input and time. I ended up following the instructions here: http://circos.ca/tutorials/lessons/configuration/perl_and_modules/ and now I can successfully run the program when logged in as root. It turns out the newest GD package is incompatible with the other modules and 2.53 should be used instead. Still not able to install GD in my other non-root profiles but this is a minor inconvenience.