帮助使用 CPAN 安装 Perl 模块 XML::Parser

帮助使用 CPAN 安装 Perl 模块 XML::Parser

我正在尝试使用 CPAN 安装 XML::Parser perl 模块,但无法使其工作。下面是 CPAN 显示的输出,似乎表明 Expat 是问题所在。我已验证系统上安装了最新版本的 Expat。

安装这个对我们来说至关重要,我不知道下一步该怎么做。任何帮助都将不胜感激!

外籍人士验证

# yum install expat-devel
Loaded plugins: fastestmirror, security
Loading mirror speeds from cached hostfile
 * rpmforge: fr2.rpmfind.net
amzn                                                                                                                                                             | 2.1 kB     00:00     
Setting up Install Process
Package expat-devel-1.95.8-8.3.8.amzn1.i386 already installed and latest version
Nothing to do

XML::Parser 安装

cpan[1]> install XML::Parser
CPAN: Storable loaded ok (v2.21)
Going to read '/root/.cpan/Metadata'
  Database was generated on Tue, 03 May 2011 00:28:04 GMT
Running install for module 'XML::Parser'
CPAN: YAML loaded ok (v0.72)
Running make for C/CH/CHORNY/XML-Parser-2.40.tar.gz
CPAN: Digest::SHA loaded ok (v5.48)
CPAN: Compress::Zlib loaded ok (v2.03)
Checksum for /root/.cpan/sources/authors/id/C/CH/CHORNY/XML-Parser-2.40.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN: Archive::Tar loaded ok (v1.68)
XML-Parser-2.40
XML-Parser-2.40/Changes
XML-Parser-2.40/Makefile.PL
XML-Parser-2.40/MANIFEST
XML-Parser-2.40/META.yml
XML-Parser-2.40/Parser.pm
XML-Parser-2.40/README
XML-Parser-2.40/Expat
XML-Parser-2.40/Expat/encoding.h
XML-Parser-2.40/Expat/Expat.pm
XML-Parser-2.40/Expat/Expat.xs
XML-Parser-2.40/Expat/Makefile.PL
XML-Parser-2.40/Expat/typemap
XML-Parser-2.40/inc
XML-Parser-2.40/inc/Devel
XML-Parser-2.40/inc/Devel/CheckLib.pm
XML-Parser-2.40/Parser
XML-Parser-2.40/Parser/LWPExternEnt.pl
XML-Parser-2.40/Parser/Encodings
XML-Parser-2.40/Parser/Encodings/big5.enc
XML-Parser-2.40/Parser/Encodings/euc-kr.enc
XML-Parser-2.40/Parser/Encodings/ibm866.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-2.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-3.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-4.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-5.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-7.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-8.enc
XML-Parser-2.40/Parser/Encodings/iso-8859-9.enc
XML-Parser-2.40/Parser/Encodings/Japanese_Encodings.msg
XML-Parser-2.40/Parser/Encodings/koi8-r.enc
XML-Parser-2.40/Parser/Encodings/README
XML-Parser-2.40/Parser/Encodings/windows-1250.enc
XML-Parser-2.40/Parser/Encodings/windows-1251.enc
XML-Parser-2.40/Parser/Encodings/windows-1252.enc
XML-Parser-2.40/Parser/Encodings/windows-1255.enc
XML-Parser-2.40/Parser/Encodings/x-euc-jp-jisx0221.enc
XML-Parser-2.40/Parser/Encodings/x-euc-jp-unicode.enc
XML-Parser-2.40/Parser/Encodings/x-sjis-cp932.enc
XML-Parser-2.40/Parser/Encodings/x-sjis-jdk117.enc
XML-Parser-2.40/Parser/Encodings/x-sjis-jisx0221.enc
XML-Parser-2.40/Parser/Encodings/x-sjis-unicode.enc
XML-Parser-2.40/Parser/Style
XML-Parser-2.40/Parser/Style/Debug.pm
XML-Parser-2.40/Parser/Style/Objects.pm
XML-Parser-2.40/Parser/Style/Stream.pm
XML-Parser-2.40/Parser/Style/Subs.pm
XML-Parser-2.40/Parser/Style/Tree.pm
XML-Parser-2.40/samples
XML-Parser-2.40/samples/canonical
XML-Parser-2.40/samples/canontst.xml
XML-Parser-2.40/samples/ctest.dtd
XML-Parser-2.40/samples/REC-xml-19980210.xml
XML-Parser-2.40/samples/xmlcomments
XML-Parser-2.40/samples/xmlfilter
XML-Parser-2.40/samples/xmlstats
XML-Parser-2.40/t
XML-Parser-2.40/t/astress.t
XML-Parser-2.40/t/cdata.t
XML-Parser-2.40/t/decl.t
XML-Parser-2.40/t/defaulted.t
XML-Parser-2.40/t/encoding.t
XML-Parser-2.40/t/ext.ent
XML-Parser-2.40/t/ext2.ent
XML-Parser-2.40/t/external_ent.t
XML-Parser-2.40/t/file.t
XML-Parser-2.40/t/finish.t
XML-Parser-2.40/t/foo.dtd
XML-Parser-2.40/t/namespaces.t
XML-Parser-2.40/t/parament.t
XML-Parser-2.40/t/partial.t
XML-Parser-2.40/t/skip.t
XML-Parser-2.40/t/stream.t
XML-Parser-2.40/t/styles.t
CPAN: File::Temp loaded ok (v0.22)

  CPAN.pm: Going to build C/CH/CHORNY/XML-Parser-2.40.tar.gz

Checking if your kit is complete...
Looks good
Writing Makefile for XML::Parser::Expat
Writing Makefile for XML::Parser
cp Parser/Encodings/x-sjis-cp932.enc blib/lib/XML/Parser/Encodings/x-sjis-cp932.enc
cp Parser/Encodings/koi8-r.enc blib/lib/XML/Parser/Encodings/koi8-r.enc
cp Parser/Encodings/iso-8859-7.enc blib/lib/XML/Parser/Encodings/iso-8859-7.enc
cp Parser/Encodings/ibm866.enc blib/lib/XML/Parser/Encodings/ibm866.enc
cp Parser/Style/Tree.pm blib/lib/XML/Parser/Style/Tree.pm
cp Parser/Encodings/iso-8859-9.enc blib/lib/XML/Parser/Encodings/iso-8859-9.enc
cp Parser/Encodings/x-euc-jp-unicode.enc blib/lib/XML/Parser/Encodings/x-euc-jp-unicode.enc
cp Parser/Encodings/README blib/lib/XML/Parser/Encodings/README
cp Parser/Encodings/euc-kr.enc blib/lib/XML/Parser/Encodings/euc-kr.enc
cp Parser/Encodings/windows-1250.enc blib/lib/XML/Parser/Encodings/windows-1250.enc
cp Parser/Encodings/windows-1252.enc blib/lib/XML/Parser/Encodings/windows-1252.enc
cp Parser/Encodings/big5.enc blib/lib/XML/Parser/Encodings/big5.enc
cp Parser/Encodings/iso-8859-3.enc blib/lib/XML/Parser/Encodings/iso-8859-3.enc
cp Parser/Encodings/Japanese_Encodings.msg blib/lib/XML/Parser/Encodings/Japanese_Encodings.msg
cp Parser/Encodings/windows-1255.enc blib/lib/XML/Parser/Encodings/windows-1255.enc
cp Parser/Encodings/x-euc-jp-jisx0221.enc blib/lib/XML/Parser/Encodings/x-euc-jp-jisx0221.enc
cp Parser/Style/Subs.pm blib/lib/XML/Parser/Style/Subs.pm
cp Parser/Encodings/iso-8859-4.enc blib/lib/XML/Parser/Encodings/iso-8859-4.enc
cp Parser/Encodings/iso-8859-8.enc blib/lib/XML/Parser/Encodings/iso-8859-8.enc
cp Parser/Encodings/x-sjis-jdk117.enc blib/lib/XML/Parser/Encodings/x-sjis-jdk117.enc
cp Parser/Encodings/iso-8859-2.enc blib/lib/XML/Parser/Encodings/iso-8859-2.enc
cp Parser/Encodings/x-sjis-unicode.enc blib/lib/XML/Parser/Encodings/x-sjis-unicode.enc
cp Parser/LWPExternEnt.pl blib/lib/XML/Parser/LWPExternEnt.pl
cp Parser/Style/Objects.pm blib/lib/XML/Parser/Style/Objects.pm
cp Parser.pm blib/lib/XML/Parser.pm
cp Parser/Style/Debug.pm blib/lib/XML/Parser/Style/Debug.pm
cp Parser/Encodings/windows-1251.enc blib/lib/XML/Parser/Encodings/windows-1251.enc
cp Parser/Encodings/x-sjis-jisx0221.enc blib/lib/XML/Parser/Encodings/x-sjis-jisx0221.enc
cp Parser/Style/Stream.pm blib/lib/XML/Parser/Style/Stream.pm
cp Parser/Encodings/iso-8859-5.enc blib/lib/XML/Parser/Encodings/iso-8859-5.enc
make[1]: Entering directory `/root/.cpan/build/XML-Parser-2.40-tJglwK/Expat'
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
make[1]: *** No rule to make target `ExtUtils/xsubpp', needed by `Expat.c'.  Stop.
make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.40-tJglwK/Expat'
make: *** [subdirs] Error 2
  CHORNY/XML-Parser-2.40.tar.gz
  /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
Failed during this command:
CHORNY/XML-Parser-2.40.tar.gz                : make NO

答案1

缺少的目标xsubpp是现代 perl 的核心 perl 的一部分,安装过程应该能够找到它的位置。您安装了哪个版本的 perl?当您尝试手动安装 XML::Parser(即下载 tarball,运行perl Makefile.PL && make)时会发生什么?听起来好像该perl Makefile.PL步骤无法找到xsubpp。您可能需要安装较新版本的ExtUtils::MakeMaker

相关内容