在过去两个小时左右的时间里,我一直在尝试在 Ubuntu 12.10 上安装 XML::Simple 并且已经完全没有想法了。它在 XML::Parser 上失败了。
我做了一个
sudo apt-get install expat
它仍然没有工作。这是我得到的错误:
make[1]: Entering directory `/home/<user>/.cpan/build/XML-Parser-2.41-MCLo7T/Expat'
cp Expat.pm ../blib/lib/XML/Parser/Expat.pm
/usr/bin/perl /usr/share/perl/5.14.2/ExtUtils/xsubpp -noprototypes -typemap /usr/share /perl/5.14/ExtUtils/typemap -typemap typemap Expat.xs > Expat.xsc && mv Expat.xsc Expat.c
cc -c -D_REENTRANT -D_GNU_SOURCE -DDEBIAN -fstack-protector -fno-strict-aliasing -pipe -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -g -DVERSION=\"2.41\" -DXS_VERSION=\"2.41\" -fPIC "-I/usr/lib/perl/5.14/CORE" Expat.c
Expat.xs:12:19: fatal error: expat.h: No such file or directory
compilation terminated.
make[1]: *** [Expat.o] Error 1
make[1]: Leaving directory `/home/sclarawu/.cpan/build/XML-Parser-2.41-MCLo7T/Expat'
make: *** [subdirs] Error 2
TODDR/XML-Parser-2.41.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
似乎告诉我它无法找到 expat.h,但我不确定为什么或如何,考虑到 expat 已安装?我试图 apt expat-devel,但它似乎不是 apt 中的一个包。任何想法将不胜感激。:)
编辑:我似乎只是试图安装错误的软件包。-.- 总是小事。非常感谢那些回答的人!