无法安装Tidyverse。扫帚问题

时间:2020-01-27 14:30:02

标签: r tidyverse broom

每当我尝试在R v 3.6.2中安装tidyverse

我收到以下错误消息:

Installing package into ‘C:/Users/daeb/Documents/R/win-library/3.6’
(as ‘lib’ is unspecified)
also installing the dependency ‘broom’


  There is a binary version available but the source version is later:
      binary source needs_compilation
broom  0.5.3  0.5.4             FALSE

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.6/tidyverse_1.3.0.zip'
Content type 'application/zip' length 440101 bytes (429 KB)
downloaded 429 KB

package ‘tidyverse’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\daeb\AppData\Local\Temp\RtmpuWXq4I\downloaded_packages
installing the source package ‘broom’

trying URL 'https://cran.rstudio.com/src/contrib/broom_0.5.4.tar.gz'
Content type 'application/x-gzip' length 1228129 bytes (1.2 MB)
downloaded 1.2 MB

* installing *source* package 'broom' ...
** package 'broom' successfully unpacked and MD5 sums checked
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
Fejl i loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  there is no package called 'zeallot'
Kald: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Kørsel stoppet
ERROR: lazy loading failed for package 'broom'
* removing 'C:/Users/daeb/Documents/R/win-library/3.6/broom'
Warning in install.packages :
  installation of package ‘broom’ had non-zero exit status

我尝试重新安装R和Rstudio,但不能解决问题。我尝试安装Rtools,但也不起作用。看来我必须用扫帚解决源代码/二进制文件的问题,但我不知道如何解决。

1 个答案:

答案 0 :(得分:2)

正如@hplieninger所建议的,最接近的问题是扫帚的安装正在寻找foreach软件包,而该软件包尚未安装:

没有名为“ zeallot”的软件包

您应该尝试手动安装zeallot软件包(zeallot),然后再次尝试安装tidyverse。

当R询问您是否要使用源代码而非二进制文件中的最新源代码版本安装软件包时,说“ no”也可能有所帮助。 (最糟糕的事情是,您最终会得到某些软件包的旧版本。)

但是令人惊讶的是,这一要求出现了。您正在使用install.packages("zeallot")吗?您是否指定类似install.packages("tidyverse")的内容?

因为根据CRAN索引页面

  • current version of broom(0.5.4,显然是R试图为您安装的版本)不会直接导入dependencies=TRUEzeallot仅在R和

导入:向后移植,dplyr,泛型(≥0.0.2),方法,nlme,purrr,reshape2,stringer,tibble,tidyr

反向导入:completejourney,graphTweets,ipumsr,keras,mlflow,statsExpressions
反向建议:列表数组,SDMtune,vctrs