简体   繁体   English

无法在DSX Desktop中安装新的R包

[英]Unable to install new R packages in DSX Desktop

I've just installed DSX Desktop with RStudio. 我刚刚在RStudio中安装了DSX Desktop。 I'm unable to load new packages, eg lubridate , and get the error below. 我无法加载新软件包,例如lubridate ,并出现以下错误。 If I check for package updates, I get the message "all packages are up-to-date", but the error below suggests it needs a newer version of Rcpp . 如果检查软件包更新,则会收到消息“所有软件包都是最新的”,但是以下错误表明它需要Rcpp的较新版本。

installing to /user-home/_global_/R/lubridate/libs
** R
** data
*** moving datasets to lazyload DB
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace ‘Rcpp’ 0.12.9.2 is already loaded, but >= 0.12.13 is required
ERROR: lazy loading failed for package ‘lubridate’
* removing ‘/user-home/_global_/R/lubridate’
Warning in install.packages :
  installation of package ‘lubridate’ had non-zero exit status

The downloaded source packages are in
  ‘/tmp/RtmpIV4HWl/downloaded_packages’

I tried install.packages("Rcpp") which returned the message: 我尝试了install.packages("Rcpp") ,它返回了以下消息:

Error in unloadNamespace(pkg_name) : 
  namespace ‘Rcpp’ is imported by ‘httpuv’, ‘reshape2’, ‘tidyr’, ‘bindrcpp’, ‘tibble’, ‘htmltools’, ‘dplyr’, ‘plyr’ so cannot be unloaded

If I try remove.packages("Rcpp") or removing the packages above, I get the following message, and they remain in the Packages view. 如果我尝试remove.packages("Rcpp")或删除上面的软件包, remove.packages("Rcpp")收到以下消息,并且它们仍保留在“软件包”视图中。

Removing package from ‘/user-home/_global_/R’
(as ‘lib’ is unspecified)
Error in remove.packages : there is no package called ‘Rcpp’

Any advice please on how to proceed? 请问任何建议如何进行?

There seems to be a fundamental problem with RStudio. RStudio似乎存在一个基本问题。 I encountered exactly the same problems you describe with the latest version (1.1.442). 我遇到了与您在最新版本(1.1.442)中描述的问题完全相同的问题。 The problems are: 问题是:

  1. Packages viewed as out-of-date go into a loop when installing with a repeated error dialog box appearing. 安装时出现重复错误对话框,被视为过时的软件包会进入循环。
  2. The package version check refers out-of-date packages and will not install the current package versions showing on CRAN. 软件包版本检查是指过期的软件包,不会安装CRAN上显示的当前软件包版本。 This is due to RStudio pointing at a MRAN mirror that has old updates. 这是由于RStudio指向具有旧更新的MRAN镜像所致。 This means that all packages stored there are out of date. 这意味着在那里存储的所有软件包都已过期。 You can see when the packages on MRAN were last updated here . 您可以在此处查看 MRAN上的软件包的最新更新时间。
  3. Removal of other packages (eg dependencies) doesn't work properly, and manual deletion of the folders doesn't solve the problem. 删除其他软件包(例如,依赖项)无法正常工作,手动删除文件夹并不能解决问题。

Inside Tools , Global options , Packages there is the ability to specify the mirror that should be used for package management. 在“ 工具” ,“ 全局选项” ,“ 包”内部,可以指定应该用于包管理的镜像。 This doesn't seem to work. 这似乎不起作用。

I fixed my problem by going into R and performing a package update inside that. 我通过进入R并在其中执行软件包更新来解决我的问题。 RStudio now uses the updated packages. RStudio现在使用更新的软件包。

I have contacted RStudio about this and received the reply that they don't provide support for free versions of RStudio. 我已就此与RStudio联系,并收到回复,他们不提供对RStudio免费版本的支持。

tl;dr: RStudio appears to be broken for updating packages. tl; dr:RStudio似乎已损坏,无法更新软件包。 Use R itself for updates. 使用R本身进行更新。

I was getting this error: Windows 7, update.packages problem: “unable to move temporary installation”? 我收到以下错误消息: Windows 7,update.packages问题:“无法移动临时安装”? Which I think was due to my antivirus, but not sure. 我认为这是由于我的防病毒软件所致,但不确定。 MRAN version was 3.3.1 and this is what I would do to fix this error everytime I opened R-Studio and needed to install: MRAN版本是3.3.1,这是我每次打开R-Studio并需要安装时都要采取的纠正此错误的措施:

trace(utils:::unpackPkgZip, edit=TRUE)
# Edit line 142 - change Sys.sleep(2.5)

I was still having versioning issues with tidyverse, so looked around and decided to install the latest MRAN from Microsoft and that fixed all of my R-Studio versioning issues and install inssues. tidyverse仍然存在版本问题,因此环顾四周,决定从Microsoft安装最新的MRAN,并解决了我所有的R-Studio版本问题并安装了插件。 I had other issues where I was doing a work. 我在工作时还有其他问题。

Version info: 版本信息:

Microsoft R Open 3.5.1
The enhanced R distribution from Microsoft
Default CRAN mirror snapshot taken on 2018-08-01.

Download Microsoft R Open 3.5.1 下载Microsoft R Open 3.5.1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM