【发布时间】:2020-11-18 16:09:48
【问题描述】:
正如标题所说,我无法在 macOS Big Sur 上通过 devtools 安装 Bookdown:
Downloading GitHub repo rstudio/bookdown@HEAD
Downloading GitHub repo rstudio/rmarkdown@HEAD
Installing 1 packages: tinytex
Installing package into ‘/usr/local/lib/R/4.0/site-library’
(as ‘lib’ is unspecified)
trying URL 'https://lib.ugent.be/CRAN/src/contrib/tinytex_0.27.tar.gz'
Content type 'application/x-gzip' length 27492 bytes (26 KB)
==================================================
downloaded 26 KB
Error: (converted from warning) Setting LC_TIME failed, using "C"
Execution halted
Error: Failed to install 'bookdown' from GitHub:
Failed to install 'rmarkdown' from GitHub:
(converted from warning) installation of package ‘tinytex’ had non-zero exit status
我在启动 R 时收到类似的警告:
During startup - Warning messages:
1: Setting LC_COLLATE failed, using "C"
2: Setting LC_TIME failed, using "C"
3: Setting LC_MESSAGES failed, using "C"
4: Setting LC_MONETARY failed, using "C"
我的系统设置为美国英语。 locale 的输出为:
LANG=""
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
我在网上找到的建议是先运行defaults write org.R-project.R force.LANG en_US.UTF-8,但这对我来说并没有任何改变。
【问题讨论】:
-
您可能需要手动安装 tinytex — 检查yihui.org/tinytex。