加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

perl – 如何在ubuntu 11.04上安装XML :: LibXML?

发布时间:2020-12-15 21:19:02 所属栏目:大数据 来源:网络整理
导读:这是安装的stdout: $sudo cpanm XML::LibXML-- Working on XML::LibXMLFetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0014.tar.gz ... OKConfiguring XML-LibXML-2.0014 ... N/A! Configure failed for XML-LibXML-2.0014. See /home
这是安装的stdout:
$sudo cpanm XML::LibXML
--> Working on XML::LibXML
Fetching http://www.cpan.org/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0014.tar.gz ... OK
Configuring XML-LibXML-2.0014 ... N/A
! Configure failed for XML-LibXML-2.0014. See /home/kahmed/.cpanm/build.log for details.

细节:

Unpacking XML-LibXML-2.0014.tar.gz
Entering XML-LibXML-2.0014
Checking configure dependencies from META.yml
Checking if you have ExtUtils::MakeMaker 0 ... Yes (6.55_02)
Configuring XML-LibXML-2.0014
Running Makefile.PL
enable native perl UTF8
running xml2-config...ok (2.9.0)
Checking for ability to link against xml2...no
Checking for ability to link against libxml2...libxml2,zlib,and/or the Math library (-lm) have not been found.
Try setting LIBS and INC values on the command line
Or get libxml2 from
  http://xmlsoft.org/
If you install via RPMs,make sure you also install the -devel
RPMs,as this is where the headers (.h files) are.

Also,you may try to run perl Makefile.PL with the DEBUG=1 parameter
to see the exact reason why the detection of libxml2 installation
failed or why Makefile.PL was not able to compile a test program.
-> N/A
-> FAIL Configure failed for XML-LibXML-2.0014. See /home/kahmed/.cpanm/build.log for details.

我尝试手动安装libxml2,但仍然遇到同样的问题。

另外,我检查了libxml2-dev:

sudo apt-get install libxml2-dev
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libxml2-dev is already the newest version.
0 upgraded,0 newly installed,0 to remove and 78 not upgraded.

这里是系统信息:

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 11.04
Release:    11.04
Codename:   natty

uname -a
Linux autobot 2.6.38-8-server#42-Ubuntu SMP Mon Apr 11 03:49:04 UTC 2011 x86_64 x86_64 x86_64 GNU / Linux

解决方法

我认为有关的方面是:
Checking for ability to link against libxml2...libxml2,and/or the Math library (-lm) have not been found.

所以,你已经覆盖了libxml。你安装了相应的zlib包吗?尝试:

sudo apt-get install zlib1g-dev

然后再尝试安装XML :: LibXML。

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读