2011-10-07 69 views
1

我运行在具有x86_64体系结构的计算机上,使用32位编译的Perl 5.8.4。当我尝试安装XML ::的libxml我得到下面的调试消息:在x86_64体系结构中编译为32位模式

... ...

# Running under perl version 5.008004 for linux 

# Current time local: Fri Oct 7 08:43:24 2011 
# Current time GMT: Fri Oct 7 06:43:24 2011 
# Using Test.pm version 1.25 
Can't load 'blib/arch/auto/Conftest/Conftest.so' for module Conftest: blib/arch/auto/Conftest/Conftest.so: wrong ELF class: ELFCLASS64 at /app/perl/.sys/i386_linux24/5.8.4/lib/5.8.4/i686-lin 
ux-thread-multi/DynaLoader.pm line 230. 
at test.pl line 2 
Compilation failed in require at test.pl line 2. 
BEGIN failed--compilation aborted at test.pl line 2. 
not ok 1 
# Failed test 1 in test.pl at line 1 
# test.pl line 1 is: use Test; BEGIN { plan tests => 1; } END { ok($loaded) } 
make: *** [test_dynamic] Error 255 
system call to 'make test 'OTHERLDFLAGS='' failed at Makefile.PL line 495. 
no 
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. 

所以,问题是,我如何能够描述.cpan属性(或Makefile.PL),我想在64位体系结构中以32位模式编译XML :: LibXML?

BR CH

+0

我想你正在使用你的系统安装的linux。您可能想要尝试安装自己的XML :: LibXML包。否则,5.8.4很旧(Perl现在是5.14.X),所以你可能想升级Perl并重新开始。 – Alex

+0

用于编译Perl本身的相同设置应该用于编译XML :: LibXML,所以字面问题相当令人困惑。 – ikegami

+1

我猜测它*正在做一个使用32位编译器和正确标志的非常好的工作 - 唯一的问题是你没有32位的libxml2。 – hobbs

回答

1
  1. 首先,检查的libxml2-devel的和zlib-devel包是否被安装在系统上如下:

    $转-ql的libxml2-devel的

    $ rpm -ql zlib-devel

  2. 如果没有安装它们,请按照以下步骤安装缺失的软件包:

    $百胜安装的libxml2-devel的

    $百胜安装的zlib-devel的

  3. 重新安装XML ::的libxml pacak与CPAN如下:

    $ CPAN

    CPAN>安装XML :: LibXML

我希望这会有所帮助。 祝你好运!

相关问题