【问题标题】:Attempting to install rmarkdown package gives me the error尝试安装 rmarkdown 包给了我错误
【发布时间】:2020-10-16 15:50:30
【问题描述】:
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : 
  namespace 'xfun' 0.13 is being loaded, but >= 0.15 is required
ERROR: lazy loading failed for package 'knitr'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/knitr'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘knitr’ had non-zero exit status
ERROR: dependency 'knitr' is not available for package 'rmarkdown'
* removing 'C:/Users/mazen/Documents/R/win-library/3.5/rmarkdown'
In R CMD INSTALL
Warning in install.packages :
  installation of package ‘rmarkdown’ had non-zero exit status

【问题讨论】:

    标签: r installation package r-markdown knitr


    【解决方案1】:

    您需要安装更新版本的 xfun

    install.packages('xfun')
    

    但是,您的 R 版本太旧 (3.5.x)。使用这个旧版本的 R,您无法访问 CRAN 的预构建二进制版本的 xfun。您的两个选择是:

    1. 要么升级R;
    2. 或安装Rtools

    除非您处于阻止您升级 R 的锁定环境中,否则我强烈建议您升级 R,而不是为旧版本的 R 安装 Rtools。

    【讨论】:

    • 啊,非常感谢你,我安装了 R (3.5.x) 因为我们的老师要求你这样做,但后来我想单独学习 rstudio,在教程中它要求我们下载 rmarkdown thx dude
    • 我不知道你的老师为什么要你使用旧版本的 R。我个人建议你安装更新的版本。
    猜你喜欢
    • 1970-01-01
    • 2019-03-09
    • 2020-11-12
    • 1970-01-01
    • 1970-01-01
    • 2021-05-07
    • 1970-01-01
    • 2022-07-01
    • 2019-12-09
    相关资源
    最近更新 更多