我最近更新了 R (版本3.4.1) 和 RStudio (版本1.0.143),现在无法从 RStudio 安装包。
如果我直接在 R 中使用 install.packages()
安装包,它可以正常工作。
如果我尝试在 RStudio 中使用 install.packages()
或者使用包安装菜单安装包,我会得到下面的错误。我尝试了几个不同的包,并已经卸载并重新安装了 R 和 RStudio。
要获取错误信息:
运行:
install.packages("lme4")
输出:
Installing package into ‘E:/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘minqa’, ‘nloptr’, ‘RcppEigen’
Warning in install.packages :
lzma decoding result 10
Error in install.packages : error reading from connection
我正在使用个人电脑工作,以下是我的系统信息:
从 options("repos")
输出的结果为:
$repos
CRAN CRANextra
"https://cran.stat.auckland.ac.nz/" "http://www.stats.ox.ac.uk/pub/RWin"
attr(,"RStudio")
[1] TRUE
从 sessionInfo()
输出结果:
Output from sessionInfo()
R version 3.4.1 (2017-06-30)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)
Matrix products: default
locale:
[1] LC_COLLATE=English_New Zealand.1252 LC_CTYPE=English_New Zealand.1252
LC_MONETARY=English_New Zealand.1252
[4] LC_NUMERIC=C LC_TIME=English_New Zealand.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.1 tools_3.4.1