在使用Biocmanager安装GEOquery时报错,安装不上,如下图显示
尝试过很多种方法:
1.更换IE配置,无效
2.更换不同镜像,无效
3.关闭电脑所有防火墙,无效
有个情况非常类似的,按照她的方法也试了
4.R里 Tools -> Global Options -> Packages and unchecking the "Use Internet Explorer library/proxy for HTTP" option,也无效
R语言日常笔记(3)R包install失败:cannot open URL - 知乎
5.怀疑是联网问题,额外运行两行代码,也无效
options(download.file.method = 'libcurl')
options(url.method='libcurl')
已经花了一个下午时间了,要疯了
6.又找到一个方法,无效
Unable to install packages in latest version of RStudio and R Version.3.1.1 - Stack Overflow
里面第二个回答的代码也试了,无效无效
options(repos='http://cran.rstudio.com/')
7.重装R和重新下载biocmanager包,也不行,最后让我找到一个非常简洁的回答,按照大神的回答的试了一下,居然可以了!!这里贴出链接:
里面代码额外运行一下,就能装了。
options(BioC_mirror="https://mirrors.tuna.tsinghua.edu.cn/bioconductor")
在library时遇到小问题,报错:
Error: package or namespace load failed for ‘GEOquery’ in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]): 载入了名字空间‘lifecycle’ 0.2.0,但需要的是>= 1.0.1
于是,找到解答2个
https://stackoverflow.com/questions/63278549/how-to-avoid-error-in-load-namespace-using-r#:~:text=Quit%20RStudio.%20Find%20the%20RStudio%20launch%20icon%2C%20either,all%20the%20packages%20and%20choose%20to%20update%20them
载入了名字空间‘cli’ 2.0.2,但需要的是>= 2.4.0 - 知乎
重新下了lifecycle还是不行,于是怒重装更高R版本,重新运行第7条的代码,这次终于可以了。