【问题标题】:Non-zero exit status tidyverse install packages Rstudio非零退出状态 tidyverse 安装包 Rstudio
【发布时间】:2020-02-18 19:55:49
【问题描述】:

我一直在互联网上漫游,试图找到解决方案,但还没有找到。

我的问题是:我无法安装 tidytext。我还发现由于某种原因我无法重新安装 tidyverse。

错误代码是:

install.packages("tidytext")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/maria/OneDrive/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  dependency ‘ISOcodes’ is not available
also installing the dependency ‘stopwords’


  There is a binary version available but the source
  version is later:
          binary source needs_compilation
stopwords  0.9.0    1.0             FALSE

installing the source packages ‘stopwords’, ‘tidytext’

trying URL 'https://cran.rstudio.com/src/contrib/stopwords_1.0.tar.gz'
Content type 'application/x-gzip' length 104532 bytes (102 KB)
downloaded 102 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidytext_0.2.2.tar.gz'
Content type 'application/x-gzip' length 3088493 bytes (2.9 MB)
downloaded 2.9 MB

ERROR: dependency 'ISOcodes' is not available for package 'stopwords'
* removing 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/stopwords'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\maria\OneDrive\Documents\R\win-library\3.4" C:\Users\maria\AppData\Local\Temp\RtmpOUYnrR/downloaded_packages/stopwords_1.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘stopwords’ had non-zero exit status
ERROR: dependency 'stopwords' is not available for package 'tidytext'
* removing 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/tidytext'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\maria\OneDrive\Documents\R\win-library\3.4" C:\Users\maria\AppData\Local\Temp\RtmpOUYnrR/downloaded_packages/tidytext_0.2.2.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘tidytext’ had non-zero exit status

The downloaded source packages are in
    ‘C:\Users\maria\AppData\Local\Temp\RtmpOUYnrR\downloaded_packages’
> install.packages("tidyverse")
Error in install.packages : Updating loaded packages

Restarting R session...

> install.packages("tidyverse")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/maria/OneDrive/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘ellipsis’, ‘vctrs’, ‘lifecycle’, ‘dplyr’, ‘haven’, ‘hms’, ‘purrr’, ‘rlang’, ‘tibble’, ‘tidyr’, ‘xml2’


  There are binary versions available but the source
  versions are later:
           binary source needs_compilation
ellipsis    0.1.0  0.3.0              TRUE
vctrs       0.1.0  0.2.2              TRUE
dplyr     0.8.0.1  0.8.4              TRUE
haven       2.1.0  2.2.0              TRUE
hms         0.4.2  0.5.3             FALSE
purrr       0.3.2  0.3.3              TRUE
rlang       0.3.4  0.4.4              TRUE
tibble      2.1.1  2.1.3              TRUE
tidyr       0.8.3  1.0.2              TRUE
xml2        1.2.0  1.2.2              TRUE
tidyverse   1.2.1  1.3.0             FALSE

  Binaries will be installed
trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/ellipsis_0.1.0.zip'
Content type 'application/zip' length 30847 bytes (30 KB)
downloaded 30 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/vctrs_0.1.0.zip'
Content type 'application/zip' length 499748 bytes (488 KB)
downloaded 488 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/dplyr_0.8.0.1.zip'
Content type 'application/zip' length 3029353 bytes (2.9 MB)
downloaded 2.9 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/haven_2.1.0.zip'
Content type 'application/zip' length 988500 bytes (965 KB)
downloaded 965 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/purrr_0.3.2.zip'
Content type 'application/zip' length 327437 bytes (319 KB)
downloaded 319 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/rlang_0.3.4.zip'
Content type 'application/zip' length 1080437 bytes (1.0 MB)
downloaded 1.0 MB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tibble_2.1.1.zip'
Content type 'application/zip' length 238931 bytes (233 KB)
downloaded 233 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/tidyr_0.8.3.zip'
Content type 'application/zip' length 907112 bytes (885 KB)
downloaded 885 KB

trying URL 'https://cran.rstudio.com/bin/windows/contrib/3.4/xml2_1.2.0.zip'
Content type 'application/zip' length 3543977 bytes (3.4 MB)
downloaded 3.4 MB

package ‘ellipsis’ successfully unpacked and MD5 sums checked
package ‘vctrs’ successfully unpacked and MD5 sums checked
package ‘dplyr’ successfully unpacked and MD5 sums checked
package ‘haven’ successfully unpacked and MD5 sums checked
package ‘purrr’ successfully unpacked and MD5 sums checked
package ‘rlang’ successfully unpacked and MD5 sums checked
package ‘tibble’ successfully unpacked and MD5 sums checked
package ‘tidyr’ successfully unpacked and MD5 sums checked
package ‘xml2’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in
    C:\Users\maria\AppData\Local\Temp\Rtmpi6CSjp\downloaded_packages
installing the source packages ‘lifecycle’, ‘hms’, ‘tidyverse’

trying URL 'https://cran.rstudio.com/src/contrib/lifecycle_0.1.0.tar.gz'
Content type 'application/x-gzip' length 150752 bytes (147 KB)
downloaded 147 KB

trying URL 'https://cran.rstudio.com/src/contrib/hms_0.5.3.tar.gz'
Content type 'application/x-gzip' length 134669 bytes (131 KB)
downloaded 131 KB

trying URL 'https://cran.rstudio.com/src/contrib/tidyverse_1.3.0.tar.gz'
Content type 'application/x-gzip' length 712837 bytes (696 KB)
downloaded 696 KB

* installing *source* package 'lifecycle' ...
** package 'lifecycle' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.0 is required
ERROR: lazy loading failed for package 'lifecycle'
* removing 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/lifecycle'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\maria\OneDrive\Documents\R\win-library\3.4" C:\Users\maria\AppData\Local\Temp\Rtmpi6CSjp/downloaded_packages/lifecycle_0.1.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘lifecycle’ had non-zero exit status
* installing *source* package 'hms' ...
** package 'hms' successfully unpacked and MD5 sums checked
** R
** preparing package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) : 
  namespace 'vctrs' 0.1.0 is being loaded, but >= 0.2.1 is required
ERROR: lazy loading failed for package 'hms'
* removing 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/hms'
* restoring previous 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/hms'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\maria\OneDrive\Documents\R\win-library\3.4" C:\Users\maria\AppData\Local\Temp\Rtmpi6CSjp/downloaded_packages/hms_0.5.3.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘hms’ had non-zero exit status
* installing *source* package 'tidyverse' ...
** package 'tidyverse' successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'haven' 2.1.0 is being loaded, but >= 2.2.0 is required
ERROR: lazy loading failed for package 'tidyverse'
* removing 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/tidyverse'
* restoring previous 'C:/Users/maria/OneDrive/Documents/R/win-library/3.4/tidyverse'
In R CMD INSTALL
Warning in install.packages :
  running command '"C:/PROGRA~1/R/R-34~1.4/bin/x64/R" CMD INSTALL -l "C:\Users\maria\OneDrive\Documents\R\win-library\3.4" C:\Users\maria\AppData\Local\Temp\Rtmpi6CSjp/downloaded_packages/tidyverse_1.3.0.tar.gz' had status 1
Warning in install.packages :
  installation of package ‘tidyverse’ had non-zero exit status

我认为问题是依赖关系,但它不在错误消息/输出中。

由于 Rtools 警告,我已经下载了以前从未需要的 Rtools - 但我明白了:

> install.packages("Rtools")
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:

https://cran.rstudio.com/bin/windows/Rtools/
Installing package into ‘C:/Users/maria/OneDrive/Documents/R/win-library/3.4’
(as ‘lib’ is unspecified)
Warning in install.packages :
  package ‘Rtools’ is not available (for R version 3.4.4)

我的 R / 系统信息:[默认] [64 位] C:\Program Files\R\R-3.4.4 我在 Microsoft 计算机上工作。

希望有人知道这里是什么!

最好的,

玛丽亚

【问题讨论】:

  • 没有名为“Rtools”的包。它是您必须安装的单独程序。你可以从这里得到它:cran.r-project.org/bin/windows/Rtools。或者当它询问您是否要安装二进制文件或从源代码构建时,只需选择二进制文件。他们不需要 Rtools 的东西,而且安装起来要容易得多。您可以使用install.packages("tidytext", type="binary") 强制执行该选项确保在新的 R 会话中执行此操作,以免与已加载的包发生冲突。
  • 顺便说一句,这里的绊脚石在前 10 行:“依赖‘ISOcodes’不可用”。因此,依赖关系级联。安装它,其他一切都应该到位。 (它应该不需要太多,它只是数据和帮助文档,没有功能。github
  • @MrFlick 我尝试了 type="binary" ,现在它似乎安装得很好。但是,当我使用库函数时,问题仍然存在。 r2evans 我安装了 ISOcodes,但问题仍然存在。你看到我遗漏了什么吗?
  • ``` > library(tidyverse) > library(ISOcodes) > install.packages("tidytext", type="binary") 警告:构建 R 包需要 Rtools,但当前未安装.请先下载并安装适当版本的 Rtools,然后再继续:包 'tidytext' 可作为源包提供,但不能作为二进制文件 install.packages 中的警告:package 'tidytext' 不可用(作为 R 版本 3.4 的二进制包)。 4)>库(tidytext)库中的错误(tidytext):没有名为'tidytext'的包```
  • 开启。你有什么理由使用这么旧版本的R吗?如果您至少升级到 R 3.6.0,这可能会消失

标签: r windows tidyverse install.packages tidytext


【解决方案1】:

@MrFlick 在上面的部分中发布了答案:

我有旧版本的 R。安装到 R 3.6.0 并且一切正常。 我首先只更新了 Rstudio,而不是 R 本身。直到我更新了 R,它才起作用。

在此处找到链接:https://cran.r-project.org/bin/windows/base/old/3.6.0/

【讨论】:

    猜你喜欢
    • 2019-01-14
    • 2020-02-08
    • 1970-01-01
    • 2017-09-21
    • 2019-03-03
    • 1970-01-01
    • 2021-04-17
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多