我正在尝试从https://wiki.documentfoundation.org/DLP/Libraries/libvisio
的mac os x中添加libvisio我已经添加了下面列出的所有依赖性:
boost
gperf
icu
librevenge
libxml2
perl
doxygen
添加依赖项后,我正在尝试运行以下命令。
$ ./autogen.sh ''# only needed for building from git''
$ ./configure
$ make
$ make install
但我遇到了第二个命令$ ./configure
得到以下错误。
configure: error: Package requirements (
libxml-2.0
) were not met:
No package 'libxml-2.0' found
Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.
Alternatively, you may set the environment variables LIBXML_CFLAGS
and LIBXML_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
我尝试使用$ brew install libxml
安装libxml2,但它说Warning: libxml2-2.9.3 already installed
。
我使用的是OS X 10.11.4
有人可以帮助我。感谢
答案 0 :(得分:8)
对于Ubuntu,以下帮助了我
apt-get install libxml2-dev
答案 1 :(得分:7)
这也应该起作用,因为我没有酿造:
yum install libxml2-devel
答案 2 :(得分:3)
所以,你已经用brew安装了libxml2。当brew告诉你何时安装libxml2:
margold@home-macbook ~ $ brew install libxml2
(...)
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/libxml2/lib
CPPFLAGS: -I/usr/local/opt/libxml2/include
(...)
这意味着brew没有将libxml2符号链接到/ usr / local / lib和/ usr / local / include,并且可能也没有将pkg-config文件链接到那里,这就是libvisio无法找到它的原因。 / p>
所以你必须在运行./configure
时指定libxml2的位置,就像brew和libvisio告诉你的那样:
./configure LIBXML_CFLAGS=-I/usr/local/opt/libxml2/include LIBXML_LIBS=-L/usr/local/opt/libxml2/lib
(系统上的路径可能会有所不同,请检查!)
解决此问题的其他方法:
inlcude/
,lib/
和pkg-config
文件符号链接到/usr/local/
答案 3 :(得分:3)
我在Ubuntu 16.04上的源代码中遇到了PHP 7.4的问题,我通过使用与上面建议的OSX相同的方式+为libxml2-dev安装开发包来解决了该问题
sudo apt-get install libxml2-dev
./configure LIBXML_CFLAGS=-I/usr/include LIBXML_LIBS=-L/usr/lib/x86_64-linux-gnu/ ....
答案 4 :(得分:2)
对于高山
apk add libxml2-dev
答案 5 :(得分:0)
没有包' libxml-2.0'结果
表示没有" / usr / lib / pkgconfig / libxml-2.0.pc ",通常位于libxml2开发文件中。喜欢" libxml2-devel" ?