XML :: Parser无法在一个非常新鲜的64位Debian框架上构建.在发布cpan XML :: Parser之后,cpan失败了很多关于Expat.c和Expat.xs的错误:
[...] Expat.xs:2182: error: ‘CallbackVector’ has no member named ‘skip_until’ Expat.c: In function ‘XS_XML__Parser__Expat_Do_External_Parse’: Expat.c:2904: error: ‘XML_Parser’ undeclared (first use in this function) Expat.c:2904: error: expected ‘;’ before ‘parser’ Expat.xs:2194: error: ‘parser’ undeclared (first use in this function) make[1]: *** [Expat.o] Error 1 make[1]: Leaving directory `/root/.cpan/build/XML-Parser-2.41-rpV6ok/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-devel.
Expat must be installed prior to building XML::Parser and I can’t find
it in the standard library directories. Install ‘expat-devel’ package with your
OS package manager. See ‘README’.
但是expat-devel不在Debian存储库中.
是否可以得到这个,而不需要从源代码构建/安装expat?
解决方法
您要安装的软件包名为libexpat1-dev.您也可以通过apt-get安装libxml-parser-perl.或者如果您真的想通过CPAN安装,请先尝试通过apt-get build-dep libxml-parser-perl安装Debian软件包依赖关系.