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

hai monks, i want install GD graph modules for Intel Solaris 10 i have tryed to install GD module but it shows some error like this as follows
Can't locate loadable object for module GD in @INC (@INC contains: /us +r/perl5/5.8.4/lib/i86pc-solaris-64int /usr/perl5/5.8.4/lib /usr/perl5 +/site_perl/5.8.4/i86pc-solaris-64int /usr/perl5/site_perl/5.8.4 /usr/ +perl5/site_perl /usr/perl5/vendor_perl/5.8.4/i86pc-solaris-64int /usr +/perl5/vendor_perl/5.8.4 /usr/perl5/vendor_perl .) at /usr/perl5/5.8. +4/lib/i86pc-solaris-64int/GD/Graph.pm line 38 Compilation failed in require at /usr/perl5/5.8.4/lib/i86pc-solaris-64 +int/GD/Graph.pm line 38. BEGIN failed--compilation aborted at /usr/perl5/5.8.4/lib/i86pc-solari +s-64int/GD/Graph.pm line 38. Compilation failed in require at /usr/perl5/5.8.4/lib/i86pc-solaris-64 +int/GD/Graph/axestype.pm line 18. BEGIN failed--compilation aborted at /usr/perl5/5.8.4/lib/i86pc-solari +s-64int/GD/Graph/axestype.pm line 18. Compilation failed in require at /usr/perl5/5.8.4/lib/i86pc-solaris-64 +int/GD/Graph/bars.pm line 18. BEGIN failed--compilation aborted at /usr/perl5/5.8.4/lib/i86pc-solari +s-64int/GD/Graph/bars.pm line 18. Compilation failed in require at graph1cgi.pl line 22. BEGIN failed--compilation aborted at graph1cgi.pl line 22.
can any body help me, and how to rectify this error by Tony1, thanks in advance

Replies are listed 'Best First'.
Re: GD module installation in Intel Solaris 10
by jbert (Priest) on Nov 07, 2006 at 07:38 UTC
    The GD object relies on some code written in C libraries (libjpeg, libpng etc), and has some C glue code to interface between the perl code and the C libraries (in perl terminology, this code uses the XS interface to talk to perl).

    This makes the module a little different to install than pure-perl modules which you often can get away with by just copying into place.

    The best way to install modules (all modules) is to use CPAN. This provides tools to automate the process and tries to warn you about anything missing on your system (and can try and fetch some of the missing bits for you). There is more info [id://A guide to installing modules|here].

    If you are missing the underlying libs GD uses, you can either fetch the source and build yourself, or use a source of packages such as sunfreeware, which, last time I looked, was the closest thing to a Linux-like RPM or deb repository.

    So...check you have a working C compiler, check you have some of those graphics libs installed, undo your previous installation and try again with CPAN:

    perl -MCPAN -e shell cpan> install GD ...
    The first time you run CPAN you'll have to go through a question/answer session about your environment, but that's not too arduous.

    When you actually try and install GD, I think it will ask you about which graphics file formats you want to support. Take care - the more you say yes to, the more C libraries you'll need installed. It might be best to just say yes to the ones you need right now, and re-install later if you need alternative formats. (e.g. I didn't have X windows on the system I was last installing on and didn't want to install the X headers to get XPM image support).