问题描述:
本人在服务器上安装R包genomation发现速度太慢,而且会报错
Installing package into ‘/root/R/x86_64-pc-linux-gnu-library/3.6’
(as ‘lib’ is unspecified)
trying URL 'https://bioconductor.org/packages/3.9/bioc/src/contrib/genomation_1.16.0.tar.gz'
Content type 'application/octet-stream' length 6293891 bytes (6.0 MB)
===================
downloaded 2.3 MB
Error in download.file(p, destfile, method, mode = "wb", ...) :
download from 'https://bioconductor.org/packages/3.9/bioc/src/contrib/genomation_1.16.0.tar.gz' failed
In addition: Warning messages:
1: In download.file(p, destfile, method, mode = "wb", ...) :
downloaded length 2435292 != reported length 6293891
2: In download.file(p, destfile, method, mode = "wb", ...) :
为解决该问题准备,准备将包genomation下载到本地,然后手动安装,在Bioconductor - BiocViews下载
输入命令,下载到本地,下载后就是解压后的包
git clone https://git.bioconductor.org/packages/genomation
安装genimation
setwd("/home/bio_soft") #给出下载的文件所在位置
install.packages("genomation", repos=NULL) #安装包
此时出现报错
ERROR: dependency ‘seqPattern’ is not available for package ‘genomation’
* removing ‘/root/R/x86_64-pc-linux-gnu-library/3.6/genomation’
Warning message:
In install.packages("genomation_1.16.0.tar.gz", repos = NULL) :
installation of package ‘genomation_1.16.0.tar.gz’ had non-zero exit status
发现缺少包seqPattern,按照上述步骤手动安装该包。(这个包下载的时候也巨慢,还会报错 ,所以也要手动安装)
重新输入命令
install.packages("genomation", repos=NULL) #安装包
安装成功
讨论
我觉的其实换个镜像,再延长时间,应该也可以下载成功,但是我没找到R对应的.Rprofile文件,所以没办法了,只能直接手动装了。
getOption('timeout')
# [1] 60
options(timeout=100)