2009-10-02 58 views
3

當我運行一個Perl腳本,我得到如何爲Perl的XML :: LibXSLT安裝libXSLT?

 
    Can't locate XML/LibXSLT.pm in @INC 

所以我儘量在cpan這樣做:

 

cpan> install XML::LibXSLT 
CPAN: Storable loaded ok 
Going to read /root/.cpan/Metadata 
    Database was generated on Fri, 02 Oct 2009 13:28:24 GMT 
Running install for module XML::LibXSLT 
Running make for P/PA/PAJAS/XML-LibXSLT-1.68.tar.gz 
CPAN: Digest::MD5 loaded ok 
CPAN: Compress::Zlib loaded ok 
Checksum for /root/.cpan/sources/authors/id/P/PA/PAJAS/XML-LibXSLT-1.68.tar.gz ok 
Scanning cache /root/.cpan/build for sizes 
XML-LibXSLT-1.68/ 
XML-LibXSLT-1.68/perl-libxml-mm.h 
XML-LibXSLT-1.68/t/ 
XML-LibXSLT-1.68/t/08literal.t 
XML-LibXSLT-1.68/t/09exslt.t 
XML-LibXSLT-1.68/t/02dromeds.t 
XML-LibXSLT-1.68/t/01basic.t 
XML-LibXSLT-1.68/t/14security.t 
XML-LibXSLT-1.68/t/12import.t 
XML-LibXSLT-1.68/t/05quick.t 
XML-LibXSLT-1.68/t/03input.t 
XML-LibXSLT-1.68/t/13error.t 
XML-LibXSLT-1.68/t/11utf8.t 
XML-LibXSLT-1.68/t/04params.t 
XML-LibXSLT-1.68/t/06entities.t 
XML-LibXSLT-1.68/t/06output.t 
XML-LibXSLT-1.68/t/07blankdoc.t 
XML-LibXSLT-1.68/t/10functions.t 
XML-LibXSLT-1.68/testcases/ 
XML-LibXSLT-1.68/testcases/default.conf 
XML-LibXSLT-1.68/Changes 
XML-LibXSLT-1.68/example/ 
XML-LibXSLT-1.68/example/1.xsl 
XML-LibXSLT-1.68/example/2.xsl 
XML-LibXSLT-1.68/example/fatal.xsl 
XML-LibXSLT-1.68/example/nonfatal.xsl 
XML-LibXSLT-1.68/example/bad1.xsl 
XML-LibXSLT-1.68/example/1.xml 
XML-LibXSLT-1.68/example/bad3.xsl 
XML-LibXSLT-1.68/example/bad2.xsl 
XML-LibXSLT-1.68/example/2.xml 
XML-LibXSLT-1.68/MANIFEST 
XML-LibXSLT-1.68/typemap 
XML-LibXSLT-1.68/Driver/ 
XML-LibXSLT-1.68/Driver/LibXSLT.pm 
XML-LibXSLT-1.68/Driver/Sablotron.pm 
XML-LibXSLT-1.68/Driver/BaseClass.pm 
XML-LibXSLT-1.68/perl-libxml-mm.c 
XML-LibXSLT-1.68/LibXSLT.pm 
XML-LibXSLT-1.68/benchmark.pl 
XML-LibXSLT-1.68/ppport.h 
XML-LibXSLT-1.68/LibXSLT.xs 
XML-LibXSLT-1.68/Makefile.PL 
XML-LibXSLT-1.68/README 
XML-LibXSLT-1.68/META.yml 
Removing previously used /root/.cpan/build/XML-LibXSLT-1.68 

    CPAN.pm: Going to build P/PA/PAJAS/XML-LibXSLT-1.68.tar.gz 

running xslt-config... failed 
using fallback values for LIBS and INC 
options: 
    LIBS='-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm' 
    INC='-I/usr/local/include -I/usr/include' 
If this is wrong, Re-run as: 
    $ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include' 

looking for -lxslt... no 
libxslt not found 
Try setting LIBS and INC values on the command line 
Or get libxslt and libxml2 from 
    http://www.libxml.org/ 
If you install via RPMs, make sure you also install the -devel 
RPMs, as this is where the headers (.h files) are. 
make: *** No targets specified and no makefile found. Stop. 
    /usr/bin/make -- NOT OK 
Running make test 
    Can't test without successful make 
Running make install 
    make had returned bad status, install seems impossible 

所以...沒有運氣。我試着編寫安裝了cpan> install XML::XSLT,但我的腳本仍然不起作用。我現在能做什麼?

我也嘗試使用YaST來安裝軟件包。這是成功的,然後我嘗試了上述,但仍然沒有運氣。

-extra-

我也試過建立綁定。從http://cpan.uwinnipeg.ca/dist/XML-LibXSLT我解壓並寫

 
    # perl Makefile.PL 
    running xslt-config... failed 
    using fallback values for LIBS and INC 
    options: 
     LIBS='-L/usr/local/lib -L/usr/lib -lxslt -lxml2 -lz -lm' 
     INC='-I/usr/local/include -I/usr/include' 
    If this is wrong, Re-run as: 
     $ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include' 

    looking for -lxslt... no 
    libxslt not found 
    Try setting LIBS and INC values on the command line 
    Or get libxslt and libxml2 from 
     http://www.libxml.org/ 
    If you install via RPMs, make sure you also install the -devel 
    RPMs, as this is where the headers (.h files) are. 
+1

Whas您使用的操作系統? – innaM 2009-10-02 16:54:50

回答

3

你缺少libxslt庫,它應該使用您的操作系統的標準包分配系統(例如它可在macports for Darwin可用,但你也可以download it from source here

這是輸出的重要組成部分,指示此:

尋找-lxslt ......沒有
沒有的libxslt發現

編輯:因爲您似乎在使用OpenSUSE,所以您可以直接從這裏下載庫:http://www.novell.com/products/linuxpackages/opensuse/libxslt.html

+0

正在尋找-lxslt ...是 正在尋找-lexslt ...沒有 我無法找到exslt – 2009-10-02 17:35:19

+0

http://www.exslt.org/download.html – Ether 2009-10-02 18:41:30

1

[針對現已合併問題:「我找不到EXSLT」:]

您是否在尋找比www.exslt.org更詳細的答案嗎?

+0

當我DLed那裏只有文件和沒有lib(xsl文件IIRC) – 2009-10-02 18:50:47

0

從YaST安裝軟件包libxml2-devellibxslt-devel

9

ubuntu上嘗試

sudo apt-get install libxml-libxslt-perl 
相關問題