如标题所示,我无法通过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(或Rscript)时显式设置LC_ALL:
LC_ALL="en_US.UTF-8" R
在R本身中设置此功能无效。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句