Linux locale? R Error: object 'en' not found - r

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.

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.

Related

Error when installing "Diffbind" package in R

I was trying to install DiffBind package in R, but it reports to me some errors. Could anyone explain to me how to fix errors and installing properly it?
That's the message:
BiocManager::install("DiffBind")
'getOption("repos")' replaces Bioconductor standard repositories, see '?repositories' for details
replacement repositories:
CRAN: https://cloud.r-project.org
Bioconductor version 3.14 (BiocManager 1.30.16), R 4.1.3 (2022-03-10)
Installing package(s) 'DiffBind'
si installano anche le dipendenze ‘RcppEigen’, ‘RcppNumerical’, ‘apeglm’
apertura URL 'https://cloud.r-project.org/src/contrib/RcppEigen_0.3.3.9.2.tar.gz'
Content type 'application/x-gzip' length 1476004 bytes (1.4 MB)
==================================================
downloaded 1.4 MB
apertura URL 'https://cloud.r-project.org/src/contrib/RcppNumerical_0.4-0.tar.gz'
Content type 'application/x-gzip' length 143327 bytes (139 KB)
==================================================
downloaded 139 KB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/apeglm_1.16.0.tar.gz'
Content type 'application/x-gzip' length 1092965 bytes (1.0 MB)
==================================================
downloaded 1.0 MB
apertura URL 'https://bioconductor.org/packages/3.14/bioc/src/contrib/DiffBind_3.4.11.tar.gz'
Content type 'application/x-gzip' length 6762432 bytes (6.4 MB)
==================================================
downloaded 6.4 MB
ERROR: failed to lock directory ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1’ for modifying
Try removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/00LOCK-RcppEigen’
ERROR: dependency ‘RcppEigen’ is not available for package ‘RcppNumerical’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/RcppNumerical’
ERROR: dependencies ‘RcppEigen’, ‘RcppNumerical’ are not available for package ‘apeglm’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/apeglm’
ERROR: dependency ‘apeglm’ is not available for package ‘DiffBind’
* removing ‘/home/posi/R/x86_64-pc-linux-gnu-library/4.1/DiffBind’
The downloaded source packages are in
‘/tmp/RtmpOMlR7W/downloaded_packages’
Installation paths not writeable, unable to update packages
path: /usr/lib/R/library
packages:
spatial, survival
Messaggi di avvertimento:
1: In .inet_warning(msg) :
installation of package ‘RcppEigen’ had non-zero exit status
2: In .inet_warning(msg) :
installation of package ‘RcppNumerical’ had non-zero exit status
3: In .inet_warning(msg) :
installation of package ‘apeglm’ had non-zero exit status
4: In .inet_warning(msg) :
installation of package ‘DiffBind’ had non-zero exit status
I was also trying to install apeglm, RcppNumerical and RcppEpigen but it returns to me with the same error message of failure installation.
Thank you,
Regards

I can't install any package because of beepr package error

I keep getting this error whenever I open rstudio.
Error in library(beepr) : there is no package called ‘beepr’
Even, when I tried installing the package itself, I get the same error!
Not just this, I was trying to install other packages on R and I couldn't because of the same error!
Edit:
I tried installing beepr package
install.packages("beepr")
and it gave that error
also installing the dependencies ‘glue’, ‘magrittr’, ‘stringi’, ‘stringr’, ‘audio’
trying URL 'https://cran.rstudio.com/src/contrib/glue_1.4.2.tar.gz'
Content type 'application/x-gzip' length 99049 bytes (96 KB)
==================================================
downloaded 96 KB
trying URL 'https://cran.rstudio.com/src/contrib/magrittr_2.0.1.tar.gz'
Content type 'application/x-gzip' length 265580 bytes (259 KB)
==================================================
downloaded 259 KB
trying URL 'https://cran.rstudio.com/src/contrib/stringi_1.7.4.tar.gz'
Content type 'application/x-gzip' length 7599762 bytes (7.2 MB)
==================================================
downloaded 7.2 MB
trying URL 'https://cran.rstudio.com/src/contrib/stringr_1.4.0.tar.gz'
Content type 'application/x-gzip' length 135777 bytes (132 KB)
==================================================
downloaded 132 KB
trying URL 'https://cran.rstudio.com/src/contrib/audio_0.1-8.tar.gz'
Content type 'application/x-gzip' length 57390 bytes (56 KB)
==================================================
downloaded 56 KB
trying URL 'https://cran.rstudio.com/src/contrib/beepr_1.3.tar.gz'
Content type 'application/x-gzip' length 922244 bytes (900 KB)
==================================================
downloaded 900 KB
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘glue’ had non-zero exit status
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘magrittr’ had non-zero exit status
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘stringi’ had non-zero exit status
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘audio’ had non-zero exit status
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘stringr’ had non-zero exit status
Error in library(beepr) : there is no package called ‘beepr’
Execution halted
Warning in install.packages :
installation of package ‘beepr’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmp0CeBTl/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning in install.packages :
converting NULL pointer to R NULL
Warning message:
R graphics engine version 14 is not supported by this version of RStudio. The Plots tab will be disabled until a newer version of RStudio is installed.

unable to install package in R Studio

I am unable to install any package from my R Studio. below errors happen while installing the package.
> install.packages("quantmod")
Installing package into '/home/shilab/R/x86_64-pc-linux-gnu-library/3.5'
(as 'lib' is unspecified)
also installing the dependencies 'xts', 'TTR'
trying URL 'https://cran.rstudio.com/src/contrib/xts_0.11-2.tar.gz'
Content type 'application/x-gzip' length 537024 bytes (524 KB)
==================================================
downloaded 524 KB
trying URL 'https://cran.rstudio.com/src/contrib/TTR_0.23-4.tar.gz'
Content type 'application/x-gzip' length 310105 bytes (302 KB)
==================================================
downloaded 302 KB
trying URL 'https://cran.rstudio.com/src/contrib/quantmod_0.4-15.tar.gz'
Content type 'application/x-gzip' length 150327 bytes (146 KB)
==================================================
downloaded 146 KB
Error in ptions(error = function() { : could not find function "ptions"
Execution halted
Warning in install.packages :
installation of package 'xts' had non-zero exit status
Error in ptions(error = function() { : could not find function "ptions"
Execution halted
Warning in install.packages :
installation of package 'TTR' had non-zero exit status
Error in ptions(error = function() { : could not find function "ptions"
Execution halted
Warning in install.packages :
installation of package 'quantmod' had non-zero exit status
The downloaded source packages are in
'/tmp/Rtmp7dTsAe/downloaded_packages'

Why plotly fails to install using R-Studio but not in R?

OS: Ubuntu 17.1
I have tried to install plotly on R studio using install.packages("plotly")
It failed with the following log:
Installing package into ‘/home/company/R/x86_64-pc-linux-gnu-library/3.4’
(as ‘lib’ is unspecified)
also installing the dependencies ‘htmlwidgets’, ‘hexbin’, ‘crosstalk’, ‘data.table’
trying URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz': HTTP status was '404 Not Found'
Error in download.file(url, destfile, method, mode = "wb", ...) :
cannot open URL 'https://cloud.r-project.org/src/contrib/htmlwidgets_1.0.tar.gz'
Warning in install.packages :
download of package ‘htmlwidgets’ failed
trying URL 'https://cloud.r-project.org/src/contrib/hexbin_1.27.2.tar.gz'
Content type 'application/x-gzip' length 491560 bytes (480 KB)
==================================================
downloaded 480 KB
trying URL 'https://cloud.r-project.org/src/contrib/crosstalk_1.0.0.tar.gz'
Content type 'application/x-gzip' length 563474 bytes (550 KB)
==================================================
downloaded 550 KB
trying URL 'https://cloud.r-project.org/src/contrib/data.table_1.10.4-3.tar.gz'
Content type 'application/x-gzip' length 3071833 bytes (2.9 MB)
==================================================
downloaded 2.9 MB
trying URL 'https://cloud.r-project.org/src/contrib/plotly_4.7.1.tar.gz'
Content type 'application/x-gzip' length 1034951 bytes (1010 KB)
==================================================
downloaded 1010 KB
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘hexbin’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘crosstalk’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘data.table’ had non-zero exit status
Warning in install.packages :
system call failed: Cannot allocate memory
Warning in install.packages :
installation of package ‘plotly’ had non-zero exit status
The downloaded source packages are in
‘/tmp/RtmpTFlAaE/downloaded_packages’
For some reason it can't allocate memory but in R it succeeds?
What is wrong here? Please advise why can't I install it straight forward?
You should try to install the development version of plotly (on GitHub) via devtools:
devtools::install_github("ropensci/plotly")

install.package() on RStudio on Amazon EC2 doesn't work. Package not available for R version 3.3.3

I've seen this: How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
and been through the list. No luck. I've also navigated via SSH to my library to see if there was some LOCK file or corrupt install. There is nothing there.
I literally just installed RStudio on Amazon EC2 and can't install the any new packages.
I've done it this way: https://aws.amazon.com/blogs/big-data/running-r-on-aws/
I've also used Ubuntu with Louis Anslett's AMI: http://www.louisaslett.com/RStudio_AMI/
I get the same problem in both. I have downloaded them manually and installed the tar.gz files from the temp directory. The CRAN repository seems to be fine because install.packages() downloads the tar.gz to /tmp/Rtmp2Rh9Zr/downloaded_packages/ just fine, but then the actual install process fails.
When I run install.packages("haven") for instance, it says
> install.packages("haven")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
also installing the dependencies ‘R6’, ‘assertthat’, ‘rlang’, ‘Rcpp’, ‘readr’, ‘hms’, ‘tibble’, ‘BH’
trying URL 'https://cran.rstudio.com/src/contrib/R6_2.2.1.tar.gz'
Content type 'application/x-gzip' length 325641 bytes (318 KB)
==================================================
downloaded 318 KB
trying URL 'https://cran.rstudio.com/src/contrib/assertthat_0.2.0.tar.gz'
Content type 'application/x-gzip' length 11612 bytes (11 KB)
==================================================
downloaded 11 KB
trying URL 'https://cran.rstudio.com/src/contrib/rlang_0.1.1.tar.gz'
Content type 'application/x-gzip' length 201419 bytes (196 KB)
==================================================
downloaded 196 KB
trying URL 'https://cran.rstudio.com/src/contrib/Rcpp_0.12.11.tar.gz'
Content type 'application/x-gzip' length 2485092 bytes (2.4 MB)
==================================================
downloaded 2.4 MB
trying URL 'https://cran.rstudio.com/src/contrib/readr_1.1.1.tar.gz'
Content type 'application/x-gzip' length 233793 bytes (228 KB)
==================================================
downloaded 228 KB
trying URL 'https://cran.rstudio.com/src/contrib/hms_0.3.tar.gz'
Content type 'application/x-gzip' length 7271 bytes
==================================================
downloaded 7271 bytes
trying URL 'https://cran.rstudio.com/src/contrib/tibble_1.3.1.tar.gz'
Content type 'application/x-gzip' length 91235 bytes (89 KB)
==================================================
downloaded 89 KB
trying URL 'https://cran.rstudio.com/src/contrib/BH_1.62.0-1.tar.gz'
Content type 'application/x-gzip' length 10181096 bytes (9.7 MB)
==================================================
downloaded 9.7 MB
trying URL 'https://cran.rstudio.com/src/contrib/haven_1.0.0.tar.gz'
Content type 'application/x-gzip' length 150016 bytes (146 KB)
==================================================
downloaded 146 KB
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘R6’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘assertthat’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘rlang’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘Rcpp’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘hms’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘BH’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘tibble’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘readr’ had non-zero exit status
Error in library(haven) : there is no package called ‘haven’
Execution halted
Warning in install.packages :
installation of package ‘haven’ had non-zero exit status
The downloaded source packages are in
‘/tmp/Rtmpia0VEs/downloaded_packages’
When I install it using the already downloaded package, it says
> install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz")
Installing package into ‘/home/jblocher/R/x86_64-redhat-linux-gnu-library/3.3’
(as ‘lib’ is unspecified)
Warning in install.packages :
package ‘/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz’ is not available (for R version 3.3.3)
If you are providing an archive file to install.packages you may need to specify repos=NULL:
install.packages("/tmp/Rtmp2Rh9Zr/downloaded_packages/haven_1.0.0.tar.gz", repos=NULL)
On my EC2 instance, I ran into the same problems when trying to install packages on RStudio, e.g., car, that involve RAM-intensive compilations. This could be fixed by adding swap space as described here
http://www.exegetic.biz/blog/2015/06/amazon-ec2-adding-swap/

Resources