2011-06-02 234 views
2

我的共享主機缺少Amazon SES腳本所需的兩個Perl模塊。它們是:perl模塊安裝共享主機

摘要:: SHA和XML ::的libxml

我從here和XML下載摘要:: SHA ::的libxml從here

提取出來,並上傳LibXML.pm和SHA.pm到我的custome目錄(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$ 

回答

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文件的安裝位置。

+0

我已經使用完整的本地安裝說明進行了更新。 – 2011-06-02 16:17:57