我正在尝试安装我的rmarkdown软件包,但是发生错误;我试图在任何地方搜索,但无法解决。你能帮我吗?
install.packages("rmarkdown")
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 2.3 2.5 FALSE
installing the source package ‘rmarkdown’
provo con l'URL 'https://cran.rstudio.com/src/contrib/rmarkdown_2.5.tar.gz'
Content type 'application/x-gzip' length 3203415 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
* installing *source* package ‘rmarkdown’ ...
** package ‘rmarkdown’ successfully unpacked and MD5 sums checked
** using staged installation
** R
** inst
** byte-compile and prepare package for lazy loading
Error in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]) :
there is no package called ‘rlang’
Calls: <Anonymous> ... loadNamespace -> withRestarts -> withOneRestart -> doWithOneRestart
Esecuzione interrotta
ERROR: lazy loading failed for package ‘rmarkdown’
* removing ‘/Library/Frameworks/R.framework/Versions/4.0/Resources/library/rmarkdown’
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/pt/w_1xy4r906n438hsc3ksgcz40000gn/T/RtmpfUajvL/downloaded_packages’
答案 0 :(得分:0)
错误消息中指出了问题
没有名为“ rlang”的软件包
尝试先安装rlang,然后重复安装rmarkdown。
答案 1 :(得分:0)
错误是这样的:
there is no package called ‘rlang’
尝试使用rlang
手动安装install.packages("rlang")
,然后重试安装rmarkdown
。
或者,尝试通过以下方式安装二进制版本:
install.packages("rmarkdown", type = "binary")