报错
安装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"
。