perl – 如何安装XML :: Parser没有expat-devel?

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软件包依赖关系.

相关文章

忍不住在 PerlChina 邮件列表中盘点了一下 Perl 里的 Web 应用框架(巧的是 PerlBuzz 最近也有一篇相关...
bless有两个参数:对象的引用、类的名称。 类的名称是一个字符串,代表了类的类型信息,这是理解bless的...
gb2312转Utf的方法: use Encode; my $str = "中文"; $str_cnsoftware = encode("utf-8...
  perl 计算硬盘利用率, 以%来查看硬盘资源是否存在IO消耗cpu资源情况; 部份代码参考了iostat源码;...
1 简单变量 Perl 的 Hello World 是怎么写的呢?请看下面的程序: #!/usr/bin/perl print "Hello W...
本文介绍Perl的Perl的简单语法,包括基本输入输出、分支循环控制结构、函数、常用系统调用和文件操作,...