【问题标题】:Unable to install Bookdown via devtools on Big Sur无法通过 Big Sur 上的 devtools 安装 Bookdown
【发布时间】: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,但这对我来说并没有任何改变。

【问题讨论】:

标签: r bookdown


【解决方案1】:

似乎可行的解决方法是在启动 R(或 Rscript)时显式设置 LC_ALL:

LC_ALL="en_US.UTF-8" R

在 R 本身中设置它不起作用。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2021-06-08
    • 2021-03-01
    • 2021-09-04
    • 2021-11-26
    • 2021-04-18
    • 2021-04-25
    • 2021-07-20
    • 2021-08-24
    相关资源
    最近更新 更多