我试图在我的RStudio版本1.4.904和R版本4.0.3中安装“ rmarkdown”,但出现以下错误。我无法打开新的rmarkdown和编织rmarkdown文件。每次尝试时,都会弹出此消息,
R Markdown documents requires an updated version of the rmarkdown package. Do you want to install this package now?
有人可以帮我吗?
install.packages(ç,dependencies = TRUE)
Installing package into ‘/Users/Library/R/4.0/library’
(as ‘lib’ is unspecified)
There is a binary version available but the source version is later:
binary source needs_compilation
rmarkdown 2.3 2.4 FALSE
installing the source package ‘rmarkdown’
trying URL 'http://cran.utstat.utoronto.ca/src/contrib/rmarkdown_2.4.tar.gz'
Content type 'application/x-gzip' length 3202546 bytes (3.1 MB)
==================================================
downloaded 3.1 MB
Warning in file(con, "r") :
cannot open file '/var/db/timezone/zoneinfo/+VERSION': No such file or directory
dyld: lazy symbol binding failed: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _utimensat
Referenced from: /Library/Frameworks/R.framework/Versions/4.0/Resources/lib/libR.dylib (which was built for Mac OS X 10.13)
Expected in: /usr/lib/libSystem.B.dylib
/Library/Frameworks/R.framework/Resources/bin/INSTALL: line 34: 30112 Done echo 'tools:::.install_packages()'
30113 Abort trap: 6 | R_DEFAULT_PACKAGES= LC_COLLATE=C "${R_HOME}/bin/R" $myArgs --no-echo --args ${args}
Warning in install.packages :
installation of package ‘rmarkdown’ had non-zero exit status
The downloaded source packages are in
‘/private/var/folders/70/lgr12kdn6wn_k36sscnc0_dw0000gn/T/Rtmpmc0jUR/downloaded_packages’```
答案 0 :(得分:0)
下载二进制tgz(https://cran.r-project.org/web/packages/rmarkdown/index.html)并直接从其安装。
应该可以。我遇到了几乎相同的问题,并以这种方式解决了。让我发布! F
答案 1 :(得分:0)
我也遇到了类似的问题,我花了半天时间才找到正确的解决方案。
我遵循的步骤:
卸载现有版本
已安装 R 的更新版本 - R 版本 4.0.4 (2021-02-15)。
点击文件->新建文件->R降价。它要求安装 Rmarkdown 软件包。
注意我需要安装的包
在 R 源上键入 install.packages("rmarkdown", dependencies = TRUE)(可以在 R 控制台上完成)
然后我尝试单独安装 Rmarkdown 软件包,它对我有用。以下是我需要安装的软件包。
install.packages('knitr') install.packages('tinytex') install.packages('base64enc') install.packages('摘要') install.packages('jsonlite') install.packages('htmltools') install.packages('rmarkdown')