jobsworth has asked for the wisdom of the Perl Monks concerning the following question:
My web service provider has just upgraded and Perl no longer has GD installed. It has a cpanel and allows a customer to install Perl modules only the C compiler is not available. In the past I have managed to install Perl modules by creating a folder called lib and copying the .pm files to it.
use lib '/home/myaccount/public_html/lib/'; works well but not for GD.pm and the folder GD.
I notice that GD.pm has 4 require statements:-
require FileHandle;
require Exporter;
require DynaLoader;
require AutoLoader;
So i have also copied FileHandle.pm, Exporter.pm and AutoLoader.pm to my lib folder. DynaLoader is something different @ISA = qw(Exporter DynaLoader);. Or maybe there is a Dynaloader.pm. It was very difficult to find the other 3 .pm files on my Debian system. I once worked on a computer telephone hot line service and found that with most customers all I had to do was listen and in framing the question the customer would provide the answer.
My test program is:-
#!/usr/bin/perl use CGI qw(:standard); print "Content-type: text/html\n\n"; $| = 1; open (STDERR, ">&STDOUT"); use CGI::Carp qw(fatalsToBrowser); use lib '/home/myaccount/public_html/lib'; use GD;
The output is:-
Can't locate loadable object for module GD in @INC (@INC contains: /home/myaccount/public_html/lib /usr/local/lib64/perl5 etc.
Compilation failed in require at test.cgi line 8.
Since GD.pm is only a wrapper for libgd do I not need to put libgd somewhere like /usr/bin? Only as a customer I have no access to /usr/bin. I think you get the idea that the problem is goung around in circles and so I have come to you.
I run Debian, Apache2 and Perl 14.
My web service provider runs Linux Apache2 and Perl 10. GD works great on my system. It makes no difference which version of GD I copy to /lib.
My web service provider is http://www.dotpromotion.net/
It might be easier to change my web service provider.
Hello monks - what do think. Yes I know copying a module from one system to another is not a good idea but what can I do?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: GD on Mediacraft
by jmacloue (Beadle) on Feb 21, 2015 at 08:14 UTC | |
|
Re: GD on Mediacraft
by bitingduck (Deacon) on Feb 21, 2015 at 06:29 UTC | |
by jobsworth (Novice) on Feb 22, 2015 at 02:12 UTC |