如何告诉CPAN Makefile.PL
在一个特定的安装中给出一个特定的参数?
特别.我想安装XML::LibXML
,并apt-get
安装库/usr/lib/libxml2.so.2.6.32
.Makefile.PL
有问题并告诉我:
using fallback values for LIBS and INC options: LIBS='-L/usr/local/lib -L/usr/lib -lxml2 -lm' INC='-I/usr/local/include -I/usr/include' If this is wrong, Re-run as: $ /usr/bin/perl Makefile.PL LIBS='-L/path/to/lib' INC='-I/path/to/include' looking for -lxml2... no looking for -llibxml2... no libxml2 not found Try setting LIBS and INC values on the command line Or get libxml2 from http://xmlsoft.org/
我知道libxml2在哪里,但我不知道怎么告诉它Makefile.PL
.
编辑:当我这样做时dpkg -L libxml2
(它是一个debian),我明白了
/. /usr /usr/lib /usr/lib/libxml2.so.2.6.32 /usr/share /usr/share/doc /usr/share/doc/libxml2 /usr/share/doc/libxml2/AUTHORS /usr/share/doc/libxml2/changelog.Debian.gz /usr/share/doc/libxml2/copyright /usr/share/doc/libxml2/README /usr/share/doc/libxml2/README.Debian /usr/share/doc/libxml2/NEWS.gz /usr/share/doc/libxml2/changelog.gz /usr/share/doc/libxml2/TODO.gz /usr/lib/libxml2.so.2
我不是该机器上的root用户,我无法进行符号链接/usr/lib
或修复它.
在CPAN shell中,您可以设置所需的值:
$ cpan cpan shell -- CPAN exploration and modules installation (v1.9205) ReadLine support available (maybe install Bundle::CPAN or Bundle::CPANxxl?) cpan[1]> o conf makepl_arg makepl_arg [] Type 'o conf' to view all configuration items cpan[2]> o conf makepl_arg "LIBS=-L/foo/bar INC=-I/foo/bar/include" makepl_arg [LIBS=-L/foo/bar INC=-I/foo/bar/include] Please use 'o conf commit' to make the config permanent! cpan[3]> install Some::Module
使用cpan命令,您可以使用该-j
开关加载自定义配置文件.您可以从-J
交换机开始转储配置,然后更改所需的值并重新加载它:
$ cpan -J > my_config.pm .... edit file .... $ cpan -j my_config.pm -i Some::Module
但是,我怀疑rafl的怀疑是正确的.