问题描述
如何告诉CPAN在一个特定的安装中给 Makefile.PL
一个特定的参数?
How can I tell CPAN to give Makefile.PL
one specific argument in one specific installation?
具体来说。我想安装 XML :: LibXML
,并且 apt-get
将库安装到 / usr / lib / libxml2.so.2.6.32
。 Makefile.PL
对此有问题,并告诉我:
Specifically. I want to install XML::LibXML
, and apt-get
installed the library to /usr/lib/libxml2.so.2.6.32
. Makefile.PL
has problems with that and tells me:
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/
$ b中获取libxml2
$ b
我知道libxml2在哪里,但我不知道如何将其告诉。
I know where the libxml2 is, but I don't know how to tell it to the Makefile.PL
.
编辑:当我执行 dpkg -L libxml2
(是debian)时,我看到
edit: When I do dpkg -L libxml2
(it's a debian), I see
/.
/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
或对其进行修复。
I am not a root on that machine and I can't make symlink in /usr/lib
or repair it.
推荐答案
Makefile.PL正在寻找 libxml2.so
。这通常是指向实际libxml2共享库的符号链接,例如 libxml2.so.2.6.32
。如果由于某种原因该符号链接由于删除而没有出现,则您的供应商未将其带有libxml2头文件包(例如Debian / Ubuntu /上的 libxml2-dev
附带在内)
The Makefile.PL is looking for libxml2.so
. That's usually a symlink to your actual libxml2 shared object, like libxml2.so.2.6.32
. If for some reason this symlink isn't around because you deleted it, your vendor didn't ship it with its libxml2 header package (e.g. libxml2-dev
on Debian/Ubuntu/etc), you will need to create it yourself.
您无需在此处将任何特定的参数传递给Makefile.PL。它已经在正确的位置寻找。它所寻找的东西根本就不存在。
You don't need to pass any specific argument to Makefile.PL here. It's already looking in the right places. The things it's looking for simply aren't there.
这篇关于如何为单个安装设置库并包含Makefile.PL的路径?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!