【问题标题】:Issues installing devtools in R在 R 中安装 devtools 的问题
【发布时间】:2019-09-04 22:08:01
【问题描述】:

尝试安装 devtools,但一直报错

Error : object ‘glue_collapse’ is not exported by 'namespace:glue' ERROR: lazy loading failed for package ‘usethis’

以下是完整的错误代码:

> install.packages('devtools', repos='http://cran.rstudio.com/')
also installing the dependency ‘usethis’


  There are binary versions available but
  the source versions are later:
         binary source needs_compilation
usethis   1.4.0  1.5.0             FALSE
devtools 1.13.6  2.0.2             FALSE

installing the source packages ‘usethis’, ‘devtools’

trying URL 'http://cran.rstudio.com/src/contrib/usethis_1.5.0.tar.gz'
Content type 'application/x-gzip' length 393903 bytes (384 KB)
==================================================
downloaded 384 KB

trying URL 'http://cran.rstudio.com/src/contrib/devtools_2.0.2.tar.gz'
Content type 'application/x-gzip' length 388141 bytes (379 KB)
==================================================
downloaded 379 KB

Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Los_Angeles'
* installing *source* package ‘usethis’ ...
** package ‘usethis’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘glue_collapse’ is not exported by 'namespace:glue'
ERROR: lazy loading failed for package ‘usethis’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/usethis’
Warning in install.packages :
  installation of package ‘usethis’ had non-zero exit status
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
  unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/Los_Angeles'
ERROR: dependency ‘usethis’ is not available for package ‘devtools’
* removing ‘/Library/Frameworks/R.framework/Versions/3.4/Resources/library/devtools’
Warning in install.packages :
  installation of package ‘devtools’ had non-zero exit status

The downloaded source packages are in
    ‘/private/var/folders/6m/np7rbj6d6hv6xf8y_9x5pq000000gn/T/Rtmp8PDiFb/downloaded_packages’

我已经安装了tidyverse,其中包含glue 包,但仍然遇到glue_collapse 的问题。此外,是否可以关闭延迟加载以修复“usethis”依赖问题?尝试了搜索方法,但没有成功的方法。

【问题讨论】:

  • 已修复!原来我需要单独安装glue 包,然后修复了usethis 问题。
  • 您可以将您的评论转换为已接受的答案并将此问题标记为已回答。它也对我有用

标签: r devtools


【解决方案1】:

添加我的原始评论作为答案以标记此问题已解决。原来我需要单独安装glue包,然后修复了usethis问题。

【讨论】:

    猜你喜欢
    • 2017-02-01
    • 1970-01-01
    • 2014-01-22
    • 1970-01-01
    • 2019-08-08
    • 2015-08-30
    • 1970-01-01
    • 2015-07-24
    相关资源
    最近更新 更多