各位大神,我租用的一个服务器,使用ananconda,在安装GEOquery包时出错,求大神支招(曾经安装好并使用过了的,但是重启后就失效了。)
source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.6 (BiocInstaller 1.28.0), ?biocLite for help
A new version of Bioconductor is available after installing the most recent version of R;
see http://bioconductor.org/install
biocLite('GEOquery')
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.6 (BiocInstaller 1.28.0), R 3.4.1 (2017-06-30).
Installing package(s) ‘GEOquery’
also installing the dependency ‘xml2’
trying URL 'https://cran.rstudio.com/src/contrib/xml2_1.2.0.tar.gz'
downloaded 245 KB
trying URL 'https://bioconductor.org/packages/3.6/bioc/src/contrib/GEOquery_2.46.15.tar.gz'
downloaded 13.1 MB
libxml-2.0.pc' to the PKG_CONFIG_PATH environment variable No package 'libxml-2.0' found 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:https://blog.csdn.net/Joshua_HIT/article/details/57404996
给你两种解决办法仅供参考: 前提是安装libxml***.tar.gz
具体如下:
1、解压:$tar zxvf libxml2-2.9.1.tar.gz
2、进入解压后的安装目录:$cd libxml2-2.9.1
3、安装三部曲:
1)$./configure
2)$make
3)$make install
如果还不可以,第一种方式:
我们在上面其实已经安装上 libxml2 了的,这里只是一个 环境变量没有设置好而已。
解决办法: 确定 /usr/local/libxml2/lib/pkgconfig 目录下有 libxml-2.0.pc
export PKG_CONFIG_PATH=/usr/local/libxml2/lib/pkgconfig:$PKG_CONFIG_PATH
再次生成 makefile , 这样就成功了
还不可以试试第二种方式(添加软连接):
查找libxml-2.0
find / -name libxml-2.0*
发现libxml-2.0.pc 在下列位置
/usr/local/libxml2/lib/pkgconfig/libxml-2.0.pc
找到默认pkgconfig路径
find / -name pkgconfig
cd /usr/lib64/pkgconfig 发现里面确实没有libxml-2.0.pc
增加一个软连接:
ln -s /usr/local/libxml2/lib/pkgconfig/libxml-2.0.pc /usr/lib64/pkgconfig/libxml-2.0.pc