【发布时间】:2018-07-12 22:18:23
【问题描述】:
每当我(从终端)启动 R 时,我都会得到:
Error: object 'en' not found
这会导致各种问题,最明显的是我无法安装软件包:
> install.packages("rmarkdown")
Installing package into ‘/home/eric/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘backports’, ‘htmltools’, ‘base64enc’, ‘rprojroot’
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/backports_1.1.2.tar.gz'
Content type 'application/x-gzip' length 10900 bytes (10 KB)
==================================================
downloaded 10 KB
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/htmltools_0.3.6.tar.gz'
Content type 'application/x-gzip' length 45408 bytes (44 KB)
==================================================
downloaded 44 KB
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/base64enc_0.1-3.tar.gz'
Content type 'application/x-gzip' length 7833 bytes
==================================================
downloaded 7833 bytes
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/rprojroot_1.3-2.tar.gz'
Content type 'application/x-gzip' length 50414 bytes (49 KB)
==================================================
downloaded 49 KB
trying URL 'https://ftp.cixug.es/CRAN/src/contrib/rmarkdown_1.8.tar.gz'
Content type 'application/x-gzip' length 2093181 bytes (2.0 MB)
==================================================
downloaded 2.0 MB
Error: object 'en' not found
Execution halted
Error: object 'en' not found
Execution halted
Error: object 'en' not found
Execution halted
Error: object 'en' not found
Execution halted
Error: object 'en' not found
Execution halted
The downloaded source packages are in
‘/tmp/RtmpjxEc33/downloaded_packages’
Warning messages:
1: In install.packages("rmarkdown") :
installation of package ‘backports’ had non-zero exit status
2: In install.packages("rmarkdown") :
installation of package ‘htmltools’ had non-zero exit status
3: In install.packages("rmarkdown") :
installation of package ‘base64enc’ had non-zero exit status
4: In install.packages("rmarkdown") :
installation of package ‘rprojroot’ had non-zero exit status
5: In install.packages("rmarkdown") :
installation of package ‘rmarkdown’ had non-zero exit status
编辑:我最初认为这可能是与语言环境有关的问题,但根据下面的 cmets,我查看了 Rprofile.site 和 Renviron.site 文件。
错误:找不到对象“en”
是由插入到 Rprofile.site 文件中的“language = en”引起的。它应该在 Renviron.site 文件中。另见this post about locale issues in the console。
【问题讨论】:
-
您是否正在加载以前的工作区?您是否自定义了 Rprofile.site 或 Renviron.site 文件?为什么您认为这是一个语言环境问题?
-
似乎有
R代码在启动时执行,其中有错误。阅读此文档:stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html 并使用提到的标志来缩小违规代码的位置并修复它。我怀疑这是一个“语言环境”问题,即使有问题的是en。 -
感谢您的 cmets。我已编辑问题以反映您的 cmets。
标签: r ubuntu locale ubuntu-16.04