我的共享主机缺少Amazon SES Scripts所需的两个Perl模块。他们是:
Digest :: SHA和XML :: LibXML
我从here下载了Digest :: SHA,从here下载了XML :: LibXML
提取并上传LibXML.pm和SHA.pm到我的客户目录(my_perl_lib)。
我已添加:
use lib "/var/chroot/home/content/09/6758009/html/my_perl_lib";
到perl脚本的第二行。
我明白了:
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.
请告知。
更新
谢谢,我创建了目录,错误消失了,但我遇到了另一个:
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.
更新
再次感谢您的回复。
结果如下:
-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$
答案 0 :(得分:1)
它需要位于“XML”目录... IE中,确保LibXML.pm实际位于/var/chroot/home/content/09/6758009/html/my_perl_lib/XML/LibXML.pm
。
<强>更新强>
您可能需要对perl模块以及随附的共享对象进行完全本地安装。您可以使用以下方法执行此操作:
# extract sources
# cd source-directory
# perl Makefile.PL INSTALL_BASE=/var/chroot/home/content/09/6758009/html/my_perl_lib
# make
# make install
这将安装该目录中所需的所有内容。然后在脚本中引用这两个路径:
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';
请注意,您可能需要更改该行的i386-linux-thread-multi
部分的体系结构。这就是.so文件的安装位置。