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

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、测试, 貌似可以了

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

 

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

 

上一篇:chromedp的使用 案例 二


下一篇:二分法(binary search)系列