我正在尝试从 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
有人可以帮我吗?谢谢
原文由 Rohan 发布,翻译遵循 CC BY-SA 4.0 许可协议
因此,您已经使用 brew 安装了 libxml2。正如 brew 在安装 libxml2 时告诉您的那样:
这意味着 brew 没有将 libxml2 符号链接到 /usr/local/lib 和 /usr/local/include,并且可能也没有将 pkg-config 文件链接到那里,这就是 libvisio 找不到它的原因。
因此,当您运行
./configure
时,您必须指定 libxml2 的位置,就像 brew 和 libvisio 告诉您的那样:(您系统上的路径可能会有所不同,因此请检查!)
解决此问题的其他方法:
inlcude/
、lib/
和pkg-config
文件的 libxml 符号链接到 —69aa9777d58adfe/usr/local/