开发者

perl module installation shared host

My shared hosting is missing two Perl modules required by Amazon SES Scripts. They are:

Digest::SHA and XML::LibXML

I downloaded Digest::SHA from here and XML::LibXML from here

Extracted, and uploaded LibXML.pm and SHA.pm to my custome directory (my_perl_lib).

I have added:

use lib "/var/chroot/home/content/09/6758009/html/my_perl_lib";

to the second line to the perl script.

I get this:

Can't locate XML/LibXML.pm in @INC (@INC contains: /var/chroot/home/content/09/6758009
/html/my_perl_lib /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5
/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-
 thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8
/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .) at ./ses-get-stats.pl line 24.
BEGIN failed--compilation aborted at ./ses-get-stats.pl line 24.

Please advise.

Updated:

thanks, i created the directory, the error gone, but i faced another one:

Can't locate loadable object for module XML::LibXML in @INC (@INC contains: /var/开发者_开发知识库chroot
/home/content/09/6758009/html/my_perl_lib .......) at /var/chroot/home/content/09/6758009
/html/my_perl_lib/XML/LibXML.pm line 153 BEGIN failed--compilation aborted at /var/chroot
/home/content/09/6758009/html/my_perl_lib/XML/LibXML.pm line 153. Compilation failed in require
 at ./ses-get-stats.pl line 24. BEGIN failed--compilation aborted at ./ses-get-stats.pl line 24. 

Updated:

thanks again for your reply.

here are the results:

-bash-3.2$ perl Makefile.PL INSTALL_BASE=/var/chroot/home/content/09/6758009/html/my_perl_lib
enable native perl UTF8
running xml2-config...ok (2.6.26)
looking for -lxml2... no
looking for -llibxml2... no
libxml2 not found
Try setting LIBS and INC values on the command line
Or get libxml2 from 
http://xmlsoft.org/
If you install via RPMs, make sure you also install the -devel
RPMs, as this is where the headers (.h files) are.

Also, you may try to run perl Makefile.PL with the DEBUG=1 parameter
to see the exact reason why the detection of libxml2 installation
failed or why Makefile.PL was not able to compile a test program.
-bash-3.2$ 


It needs to be inside an "XML" directory... IE, make sure that LibXML.pm is actually in /var/chroot/home/content/09/6758009/html/my_perl_lib/XML/LibXML.pm.

Updated:

You probably need to do a full local install of the perl module, and the shared object that accompanies it. You can do this by using:

# extract sources
# cd source-directory
# perl Makefile.PL INSTALL_BASE=/var/chroot/home/content/09/6758009/html/my_perl_lib
# make
# make install

This will install everything needed into that directory. Then in the script, reference both of these paths:

use lib '/var/chroot/home/content/09/6758009/html/my_perl_lib/lib/perl5';
use lib '/var/chroot/home/content/09/6758009/html/my_perl_lib/lib/perl5/i386-linux-thread-multi/auto';

Note that you'll likely need to change the architecture of the i386-linux-thread-multi part of that line. That's where the .so file is installed.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜