libxml2

报错

安装R包时遇到installation of packages had non-zero exit status,并伴随前置报错信息:

Package libxml-2.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable
No package 'libxml-2.0' found
Using PKG_CFLAGS=
Using PKG_LIBS=-lxml2
------------------------- ANTICONF ERROR ---------------------------
Configuration failed because libxml-2.0 was not found. Try installing:
 * deb: libxml2-dev (Debian, Ubuntu, etc)
 * rpm: libxml2-devel (Fedora, CentOS, RHEL)
 * csw: libxml2_dev (Solaris)

缺少用于解析XML文档的libxml2软件库。

安装

wget ftp://xmlsoft.org/libxml2/libxml2-2.7.8.tar.gz

tar -zxvf libxml2-2.7.8.tar.gz

cd libxml2-2.7.8/

./configure  --prefix=/home/usr/biosoft/libxml2-2.7.8
make
make install

echo 'export  LD_LIBRARY_PATH=/home/usr/biosoft/lib'  >>  ~/.bashrc
echo 'export export PKG_CONFIG_PATH=/home/usr/biosoft/lib/pkgconfig'  >>  ~/.bashrc
source  ~/.bashrc

configure 报错

./configure --prefix=/home/usr/biosoft/libxml2-2.7.8 -- cannot remove libtoolT: No such file or directory

解决方法: 注释掉configure中的RM "$cfgfile"

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容