RStudio不允许我安装任何新软件包。例如,我今天尝试安装“rio”并收到以下消息:
install.packages("rio")
Installing package into ‘C:/Users/kjl5444/Documents/R/win-library/3.2’
(as ‘lib’ is unspecified)
Warning in install.packages :
dependency ‘openxlsx’ is not available
There is a binary version available but the source version is later:
binary source needs_compilation
rio 0.4.0 0.5.5 FALSE
installing the source package ‘rio’
trying URL 'https://cran.rstudio.com/src/contrib/rio_0.5.5.tar.gz'
Content type 'application/x-gzip' length 390824 bytes (381 KB)
downloaded 381 KB
'C:\Program' is not recognized as an internal or external command,
operable program or batch file.
Warning in install.packages :
running command '"C:/Program Files/R/R-32~1.2/bin/x64/R" CMD INSTALL -l "C:\Users\kjl5444\Documents\R\win-library\3.2" C:\Users\kjl5444\AppData\Local\Temp\RtmpaQwlLL/downloaded_packages/rio_0.5.5.tar.gz' had status 1
Warning in install.packages :
installation of package ‘rio’ had non-zero exit status
The downloaded source packages are in
‘C:\Users\kjl5444\AppData\Local\Temp\RtmpaQwlLL\downloaded_packages’
> library(rio)
Error in library(rio) : there is no package called ‘rio’
有关解密和修复此错误的任何帮助吗?
答案 0 :(得分:0)
尝试在 Microsoft Windows 中安装 rio
软件包时。我遇到了一个错误。为了解决这个问题,我用谷歌搜索并来到了这个页面。
我知道这篇文章有点旧,但我想分享给那些在安装这个包时遇到类似问题的人。
类似于这篇文章: Error: "there is no package called ..." and trying to use install.packages to solve it
我只能在使用以下命令时安装 rio
:
install.packages('rio', dependencies = TRUE, repos='http://cran.rstudio.com/')
也许它可以帮助您成功安装所需的包,因为它确保依赖项也与所需的包一起安装。