异常:
> install.packages("rms") --- Please select a CRAN mirror for use in this session --- Warning: failed to download mirrors file (cannot open URL 'https://cran.r-project.org/CRAN_mirrors.csv'); using local file '/Bioinfo/Pipeline/SoftWare/R/R-3.6.1/lib64/R/doc/CRAN_mirrors.csv' trying URL 'http://mirrors.tuna.tsinghua.edu.cn/CRAN/src/contrib/rms_6.0-0.tar.gz' Content type 'application/x-gzip' length 623859 bytes (609 KB) ================================================== downloaded 609 KB ...... * DONE (rms) The downloaded source packages are in ‘/tmp/RtmpJF5nYY/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In download.file(url, destfile = f, quiet = TRUE) : URL 'https://cran.r-project.org/CRAN_mirrors.csv': status was 'SSL connect error' >
参考方法:
- 先设置镜像,再执行包安装。
# CRAN 镜像源配置文件之一是 .Rprofile (linux 下位于 ~/.Rprofile ),可以在文末添加如下语句: options("repos" = c(CRAN="https://mirrors.tuna.tsinghua.edu.cn/CRAN/"))