R 3.4第一次通话后无法下载包

时间:2017-01-18 11:54:09

标签: r

我正在使用 MacOS Sierra R 3.4

对于每个R会话,只有第一次install.pakages()次呼叫成功,以及随后的第二次,第三次......呼叫将失败。

示例:

(Start R session)
> install.packages('knitr')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)

installing the source package ‘knitr’

trying URL 'https://mirrors.ustc.edu.cn/CRAN/src/contrib/knitr_1.15.1.tar.gz'
Content type 'application/gzip' length 1027808 bytes (1003 KB)
==================================================
downloaded 1003 KB

* installing *source* package ‘knitr’ ...
** package ‘knitr’ successfully unpacked and MD5 sums checked
** R
** demo
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (knitr)

The downloaded source packages are in
    ‘/private/var/folders/zr/3wnym8h941xgpwlr9pnnmrjr0000gn/T/RtmpaLDxA4/downloaded_packages’
> install.packages('lattice')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)
Error in install.packages : error reading from connection
> install.packages('ggplot2')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)
Error in install.packages : error reading from connection

然后尝试重启R会话

(New session)
> install.packages('ggplot2')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)

installing the source package ‘ggplot2’

trying URL 'https://mirrors.ustc.edu.cn/CRAN/src/contrib/ggplot2_2.2.1.tar.gz'
Content type 'application/gzip' length 2213308 bytes (2.1 MB)
==================================================
downloaded 2.1 MB

* installing *source* package ‘ggplot2’ ...
** package ‘ggplot2’ successfully unpacked and MD5 sums checked
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** installing vignettes
** testing if installed package can be loaded
* DONE (ggplot2)

The downloaded source packages are in
    ‘/private/var/folders/zr/3wnym8h941xgpwlr9pnnmrjr0000gn/T/RtmpwBrMiX/downloaded_packages’
> install.packages('lattice')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)
Error in install.packages : error reading from connection
> install.packages('knitr')
Installing package into ‘/Users/lytzeseikiri/Library/R/3.4/library’
(as ‘lib’ is unspecified)
Error in install.packages : error reading from connection

使用biocLite()时也会出现相同的情况,错误信息就像

> source("https://bioconductor.org/biocLite.R")
Bioconductor version 3.5 (BiocInstaller 1.25.2), ?biocLite for help
> biocLite("BiocGenerics")
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.5 (BiocInstaller 1.25.2), R Under development (unstable) (2017-01-15
  r71979).
Installing package(s) ‘BiocGenerics’
Warning: unable to access index for repository https://mirrors.ustc.edu.cn/CRAN/bin/macosx/mavericks/contrib/3.4:
  cannot download all files
trying URL 'https://bioconductor.org/packages/3.5/bioc/bin/macosx/mavericks/contrib/3.4/BiocGenerics_0.21.3.tgz'
Content type 'application/x-gzip' length 561531 bytes (548 KB)
==================================================
downloaded 548 KB


The downloaded binary packages are in
    /var/folders/zr/3wnym8h941xgpwlr9pnnmrjr0000gn/T//RtmpLFiUbt/downloaded_packages
Old packages: 'acepack', 'hexbin', 'kernlab', 'mvtnorm', 'SparseM', 'TTR'
Update all/some/none? [a/s/n]: 
a
Error in readRDS(dest) : error reading from connection
> biocLite('mzR')
BioC_mirror: https://bioconductor.org
Using Bioconductor 3.5 (BiocInstaller 1.25.2), R Under development (unstable) (2017-01-15
  r71979).
Installing package(s) ‘mzR’
Error in readRDS(dest) : error reading from connection

在询问我是否要更新所有/部分/无旧软件包之后发生错误,我回复了a。在第一次连接事件中,第二个biocLite()似乎失败了。

0 个答案:

没有答案