其他分享
首页 > 其他分享> > Package libxml-2.0 was not found in the pkg-config search path

Package libxml-2.0 was not found in the pkg-config search path

作者:互联网

 

1、问题 Package libxml-2.0 was not found in the pkg-config search path

 

 

 

2、检查是否有库文件, no

root@PC1:/home/software# find / -name "libxml-2.0.pc"

 

root@PC1:/home/software# echo $PKG_CONFIG_PATH

这个变量啥也没有

 

3、尝试解决

root@PC1:/home/software# wget ftp://xmlsoft.org/libxml2/libxml2-2.9.2.tar.gz
root@PC1:/home/software# tar -xvf libxml2-2.9.2.tar.gz
root@PC1:/home/software# cd libxml2-2.9.2
root@PC1:/home/software/libxml2-2.9.2# ./configure --prefix=/usr --disable-static --with-history
root@PC1:/home/software/libxml2-2.9.2# make
root@PC1:/home/software/libxml2-2.9.2# make install

 

4、检查库文件,有了!

root@PC1:/home/software/libxml2-2.9.2# find / -name "libxml-2.0.pc"
/home/software/libxml2-2.9.2/libxml-2.0.pc
/usr/lib/pkgconfig/libxml-2.0.pc

 

root@PC1:/home/software/libxml2-2.9.2# echo $PKG_CONFIG_PATH

但是,这个环境变量还是空的, 暂且不管他。

 

5、测试, 貌似可以了

 

参考:https://stackoverflow.com/questions/31797524/r-devtools-fails-as-package-libxml-2-0-was-not-found-in-the-pkg-config-search-p

 

标签:search,Package,libxml2,PC1,root,2.9,home,config,software
来源: https://www.cnblogs.com/liujiaxin2018/p/15443250.html