我正在尝试从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.
我试图安装libxml2与,$ brew install libxml
但它说Warning: libxml2-2.9.3 already installed
。
我正在使用OS X 10.11.4
有人可以帮我一下吗。谢谢
因此,您已经在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找不到它的原因。
因此,您必须在运行时指定libxml2的位置./configure
,就像brew和libvisio告诉您的那样:
./configure LIBXML_CFLAGS=-I/usr/local/opt/libxml2/include LIBXML_LIBS=-L/usr/local/opt/libxml2/lib
(系统上的路径可能会有所不同,因此请检查!)
解决此问题的其他方法:
inlcude/
,lib/
和pkg-config
的libxml的文件到/usr/local/
自己本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句