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

 

posted @ 2021-10-23 15:19  小鲨鱼2018  阅读(1103)  评论(0编辑  收藏  举报