gpt4 book ai didi

perl - XML::Parser 拒绝安装

转载 作者:行者123 更新时间:2023-12-03 09:15:23 25 4
gpt4 key购买 nike

在过去两个小时左右的时间里,我一直在尝试在 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 中的一个包。任何想法将不胜感激。 :)

编辑:我似乎只是试图安装错误的软件包。 -.- 总是小事。非常感谢回答的人!

最佳答案

获取@Moritz Bunkus 上面指出的相同信息的另一种方法。

ubuntu:~$ apt-cache search expat 
expat - XML parsing C library - example application
libexpat1 - XML parsing C library - runtime library
libexpat1-dev - XML parsing C library - development kit

结果集中的第三个是您要查找的内容。

关于perl - XML::Parser 拒绝安装,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13986282/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com