0

Whenever I start R (from the terminal), I get:

Error: object 'en' not found

This causes all kinds of problems, most notably that I cannot install packages:

> 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

Edit: I initially thought that this could be a problem related to locale, but as per comments below, I had a look at the Rprofile.site and Renviron.site files. The

Error: object 'en' not found

was caused by "language = en" inserted into the Rprofile.site-file. It should have been in the Renviron.site-file instead. See also this post about locale issues in the console.

ElToro1966
  • 831
  • 1
  • 8
  • 20
  • Are you loading a previous workspace? Do you have customized the Rprofile.site or Renviron.site files? Why do you believe this is a locale issue? – Roland Feb 02 '18 at 12:05
  • 1
    It seems like there is `R` code being executed on start-up that has an error in it. Read this documentation: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Startup.html and use the flags mentioned to narrow down where the offending code is, and fix it. I doubt this is a "locale" problem, even though the offending thing is `en`. – ngm Feb 02 '18 at 14:28
  • Thank you for your comments. I have edited the question to reflect your comments. – ElToro1966 Feb 05 '18 at 13:00

1 Answers1

0

Thanks to the comments, it is clear that the

Error: object 'en' not found

was caused by "language = en" inserted into the Rprofile.site-file instead of in the Renviron.site-file instead. See also this post about locale issues in the console.

ElToro1966
  • 831
  • 1
  • 8
  • 20