我需要 Linux 机器中的 LibXML,并且像其他帖子一样出现下一个错误:
Can't locate XML/LibXML.pm in @INC
我看到了解决方案,但我遇到的问题是,当尝试使用 cpan 生成库时,显示未找到编译器的错误。我一直在寻找问题的答案,并且找到了使用 apt-get 或 mcpan 进行安装的方法,但没有获得 apt-get 或 aptitude 命令,我只能使用 ipkg install perl_libXML 或使用 cpan。
cpan 的错误是下一个:
perl -MCPAN -e shell
Terminal does not support AddHistory.
cpan shell -- CPAN exploration and modules installation (v2.00)
Enter 'h' for help.
cpan[1]> install XML::LibXML
Reading '/root/.cpan/Metadata'
Database was generated on Sat, 01 Nov 2014 19:17:02 GMT
Running install for module 'XML::LibXML'
Running make for S/SH/SHLOMIF/XML-LibXML-2.0117.tar.gz
Checksum for /root/.cpan/sources/authors/id/S/SH/SHLOMIF/XML-LibXML-2.0117.tar.gz ok
Scanning cache /root/.cpan/build for sizes
............................................................................DONE
CPAN.pm: Building S/SH/SHLOMIF/XML-LibXML-2.0117.tar.gz
Use of uninitialized value $config_val in pattern match (m//) at inc/Devel/CheckLib.pm line 372.
Couldn't find your C compiler
Compilation failed in require at Makefile.PL line 92.
BEGIN failed--compilation aborted at Makefile.PL line 92.
Warning: No success on command[/usr/bin/perl Makefile.PL]
SHLOMIF/XML-LibXML-2.0117.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Running make test
Make had some problems, won't test
Running make install
Make had some problems, won't install
Could not read metadata file. Falling back to other methods to determine prerequisites
Failed during this command:
SHLOMIF/XML-LibXML-2.0117.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 512
cpan[2]>
我不知道为什么使用 ipkg 安装没问题,但在不工作之后。我认为如果进程找到 c 编译器,使用 cpan 会起作用,但我不知道问题出在哪里,或者如何告诉 cpan 编译器的路径,或者是否需要安装它。
我尝试手动编译,这就是结果,但我不明白为什么没有编译器,我有多个编译器和系统。Ť他的错误是:
root@Linux: ~/.cpan/build/XML-LibXML-2.0117-tF5gWA # perl Makefile.PL DEBUG=1
Use of uninitialized value $config_val in pattern match (m//) at inc/Devel/CheckLib.pm line 372.
Couldn't find your C compiler
Compilation failed in require at Makefile.PL line 92.
BEGIN failed--compilation aborted at Makefile.PL line 92.
root@Kubyx: ~/.cpan/build/XML-LibXML-2.0117-tF5gWA #
你能帮我解决问题还是手工编译?