I am running an Rscript using crontab. In that Rscript command, I am trying to load googlesheets package using library(googlesheets). Note, I have already installed googlesheets package is already installed.
I am getting this error:
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/sparavas/R/x86_64-pc-linux-gnu-library/3.2/purrr/libs/purrr.so':
/home/sparavas/R/x86_64-pc-linux-gnu-library/3.2/purrr/libs/purrr.so: ELF file OS ABI invalid
In addition: Warning message:
package 'googlesheets' was built under R version 3.2.3
Error: package or namespace load failed for 'googlesheets'
Execution halted
When I run the same script from terminal, I am not getting this error. This errors comes only when ran through crontab.
I also tried to get below sessionInfo (if this might help to detect the problem) :
R version 3.2.0 (2015-04-16)
Platform: x86_64-unknown-linux-gnu (64-bit)
locale:
[1] C
attached base packages:
[1] methods stats graphics grDevices utils datasets base
other attached packages:
[1] devtools_1.11.1 reshape2_1.4.1 DIVER_0.1.1 hash_2.2.6
[5] dplyr_0.4.3
loaded via a namespace (and not attached):
[1] Rcpp_0.12.1 digest_0.6.8 withr_1.0.1 assertthat_0.1 R6_2.1.0
[6] plyr_1.8.2 DBI_0.3.1 magrittr_1.5 stringi_0.4-1 tools_3.2.0
[11] stringr_1.0.0 parallel_3.2.0 memoise_1.0.0
I also tried reinstalling packages purrr, dplyr, googlesheets. Please suggest what I am missing.
Also what does:
ELF file OS ABI invalid
mean?
Related
I have been running a bash script (under Ubuntu) that calls and runs some R scripts to plot some maps with ggplot2. As it is a production system I don't update any new R or package releases. But recently I tried to install plotly with an error message output.
Now, when trying to run the script (calling a php webpage trhough a browser; that was running fine for a lot of time) an error with crayon package halts and exits the script without plotting the maps.
'/usr/lib/R/bin/R --slave --no-restore --no-save --no-restore --file=./RAMS-mapa-onades-zones-manual.R'
Loading required package: sp
Loading required package: methods
Checking rgeos availability: TRUE
Error : .onLoad failed in loadNamespace() for 'pillar', details:
call: loadNamespace(name)
error: there is no package called 'crayon'
Error: package or namespace load failed for 'ggplot2'
Execution halted
But if I run from a terminal or with RStudio server crayon package is loaded, ggplot2 is also properly loaded, and the maps are produced.
crayon package (located at /home/meteo/R/i686-pc-linux-gnu-library/3.1) called as
library("crayon", lib.loc= c("/home/meteo/R/i686-pc-linux-gnu-library/3.1", "/usr/local/lib/R/site-library", "/usr/lib/R/library"))
R session info on Rstudio Server:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: i686-pc-linux-gnu (32-bit)
Running under: Ubuntu precise (12.04.5 LTS)
locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C LC_MONETARY=C LC_MESSAGES=C
[7] LC_PAPER=C LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=C LC_IDENTIFICATION=C
attached base packages:
[1] grid stats graphics grDevices utils datasets methods base
other attached packages:
[1] crayon_1.3.4 rgdal_0.9-1 rgeos_0.3-8 raster_2.3-24 gpclib_1.5-5 mapproj_1.2-2 maps_2.3-9
[8] stringr_0.6.2 plyr_1.8.1 ggplot2_3.2.0 maptools_0.8-34 sp_1.2-3
loaded via a namespace (and not attached):
[1] Rcpp_1.0.1 magrittr_1.5 tidyselect_0.2.5 munsell_0.5.0 colorspace_1.2-4 lattice_0.20-33 R6_2.4.0
[8] rlang_0.3.4 dplyr_0.8.1 tools_3.2.2 gtable_0.1.2 withr_2.1.2 digest_0.6.8 lazyeval_0.2.2
[15] assertthat_0.2.1 tibble_2.1.3 purrr_0.3.2 glue_1.3.1 labeling_0.3 pillar_1.4.1 scales_1.0.0
[22] foreign_0.8-66 pkgconfig_2.0.2
Maybe there is a version conflict? How do I check?
what version of R is in /usr/lib/R/bin/R? Basically it appears you are in a slight "dependency hell" I would run /usr/lib/R/bin/R and check to see if crayon is installed there. #Alexis is correct though, it is not wise to mix versions like that. Let R handle library location unless you are trying to separate packages. Check the libraries for 3.2.2 and see if crayon is installed. you may have switched your R version since plotly depends on R >=3.2.0 https://cran.r-project.org/web/packages/plotly/
I think the easy fix would be to correct your .libpaths() i.e not call the 3.1 library and install the correct version of the packages you need.
OR
switch from R 3.2 back to R 3.1
Whenever I try to install any packages in R I now get this error. This didn't used to happen and is new within the last month and seems to be ubiquitous across all packages I try to install.
I am using R studio but the error occurred when I tried to use just R alone, as well. Currently trying to install rscopus package but the error occurs with most all packages I have tried to install.
Thanks.
Console:
installing the source package ‘rscopus’
trying URL 'https://cran.rstudio.com/src/contrib/rscopus_0.6.3.tar.gz'
Content type 'application/x-gzip' length 40422 bytes (39 KB)
==================================================
downloaded 39 KB
Warning in strptime(xx, f <- "%Y-%m-%d %H:%M:%OS", tz = tz) :
unknown timezone 'zone/tz/2018i.1.0/zoneinfo/America/New_York'
* installing *source* package ‘rscopus’ ...
** package ‘rscopus’ successfully unpacked and MD5 sums checked
** R
** inst
** preparing package for lazy loading
Error : object ‘as_tibble’ is not exported by 'namespace:dplyr'
ERROR: lazy loading failed for package ‘rscopus’
* removing
‘/Library/Frameworks/R.framework/Versions/3.3/Resources/library/rscopus’
Warning in install.packages :
installation of package ‘rscopus’ had non-zero exit status
The downloaded source packages are in ‘/private/var/folders/wz/p_wg38vx11vcp94hhcw5dv_w0000gn/T/RtmpaJeH3b/downloaded_packages’
Sessioninfo()
R version 3.3.2 (2016-10-31)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: macOS 10.14.1
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] tibble_1.3.4 DescTools_0.99.21 dplyr_0.5.0 car_2.1-4
loaded via a namespace (and not attached):
[1] Rcpp_0.12.11 magrittr_1.5 splines_3.3.2 MASS_7.3-45 lattice_0.20-34
[6] R6_2.2.0 rlang_0.1.6 minqa_1.2.4 tools_3.3.2 nnet_7.3-12
[11] parallel_3.3.2 pbkrtest_0.4-6 grid_3.3.2 nlme_3.1-128 mgcv_1.8-15
[16] quantreg_5.29 DBI_0.5-1 MatrixModels_0.4-1 lme4_1.1-12 assertthat_0.1
[21] manipulate_1.0.1 Matrix_1.2-7.1 nloptr_1.0.4 boot_1.3-18 expm_0.999-2
[26] mvtnorm_1.0-6 SparseM_1.74 foreign_0.8-67
For anyone else with similar issues, I updated to the newest version of R and it seemed to solve the problem.
Thinking back to the origin of the problem, it coincided with updated to OS X Mojave.
I'm the maintainer for the package 'rase' (link).
I haven't changed the code at all since Nov 9, 2015, when the package could load without problems. However, I have received emails asking about the following problem when loading the package:
> library(rase)
Error in loadNamespace(j <- i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) :
there is no package called ‘Biostrings’
Error: package or namespace load failed for ‘rase’
I tried then to do it in my own computer, and I received the same message. Between the last time I loaded the package successfully (Nov 2015) and now, I upgraded R to v 3.2.3. Naively, I reinstalled v3.2.2, but the same error appears. I have checked rase code (git here) thoroughly, but no changes have been made and there is no reference whatsoever to 'Biostrings' (or any function within). 'rase' dependencies and imports do not include 'Biostrings'.
Any help would be much appreciated as I don't know why this is happening (I'm a novice when creating packages). I guess I could install 'Biostrings', but I don't want to make a seemingly unnecessary dependency.
Here is my sessionInfo:
> sessionInfo()
R version 3.2.2 (2015-08-14)
Platform: x86_64-apple-darwin13.4.0 (64-bit)
Running under: OS X 10.11.2 (El Capitan)
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] ape_3.4 data.table_1.9.6
loaded via a namespace (and not attached):
[1] quadprog_1.5-5 lattice_0.20-33 mvtnorm_1.0-3 msm_1.6
[5] MASS_7.3-43 chron_2.3-47 grid_3.2.2 nnls_1.4
[9] nlme_3.1-121 magrittr_1.5 Matrix_1.2-2 splines_3.2.2
[13] tools_3.2.2 igraph_1.0.1 maps_3.0.2 parallel_3.2.2
[17] numDeriv_2014.2-1 survival_2.38-3 mnormt_1.5-3 clusterGeneration_1.3.4
[21] animation_2.4 expm_0.999-0
Biostrings is a BioConductor package which you install following the instructions on this page:
## try http:// if https:// URLs are not supported
source("https://bioconductor.org/biocLite.R")
biocLite("Biostrings")
If you add BioC as a known repository on your system, it will be installable via install.packages() too. Eg this would do
r <- getOption("repos")
r["CRAN"] <- "http://cran.rstudio.com"
r["BioCsoft"] <- "http://www.bioconductor.org/packages/release/bioc"
options(repos = r)
in your .Rprofile or Rprofile.site.
When I tried git-hub install, using:
install_github('slidify', 'ramnathv')
But I got the follwing message:
> install_github('slidify', 'ramnathv')
Installing github repo slidify/master from ramnathv
Downloading master.zip from https://github.com/ramnathv/slidify/archive/master.zip
Installing package from C:\Users\6E86~1\AppData\Local\Temp\RtmpYD4xRM/master.zip
Installing slidify
"C:/PROGRA~1/R/R-31~1.0/bin/i386/R" --vanilla CMD INSTALL "C:\Users\ \
ע\AppData\Local\Temp\RtmpYD4xRM\devtools1f901f6d4e5e\slidify-master" \
--library="C:/Program Files/R/R-3.1.0/library" --install-tests
Warning: invalid package 'C:\Users\ע\AppData\Local\Temp\RtmpYD4xRM\devtools1f901f6d4e5e\slidify-master'
Error: ERROR: no packages specified
Error: Command failed (1)
I also tried downlowding "slidify-master.zip" and installing it localy using:
install.packages("c:/r/packages/slidify-master.zip", repos = NULL, type="source")
but nothing seems to happen, and the package is not installed:
> library(slidify)
Error in library(slidify) : there is no package called ‘slidify’
my sessionInfo() is:
> sessionInfo()
R version 3.1.0 (2014-04-10)
Platform: i386-w64-mingw32/i386 (32-bit)
locale:
[1] LC_COLLATE=Hebrew_Israel.1255 LC_CTYPE=Hebrew_Israel.1255
[3] LC_MONETARY=Hebrew_Israel.1255 LC_NUMERIC=C
[5] LC_TIME=Hebrew_Israel.1255
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_1.5
loaded via a namespace (and not attached):
[1] digest_0.6.4 evaluate_0.5.5 httr_0.3 memoise_0.2.1 parallel_3.1.0
[6] RCurl_1.95-4.1 stringr_0.6.2 tools_3.1.0 whisker_0.3-2
any ideas?
The problem presisted when I tried to install other packages from Github.
Seems it has to do ith the user name, and the directory where the downloads are stored.
I created a new user in windows with a simple name (no spaces, no special characters) and the installation succeeded !
After successfully creating a graph with this code:
qplot(ethcat3, Percent, data=g_02_1b_pov, geom="bar", stat="identity")
I would like to save the graph as a png, pdf, or jpeg file. I used the following code:
ggsave(file="test.png")
Instead of outputting the graph, I receive the following (error) message:
Saving 7.82 x 3.75 in image
Error in eval(expr, envir, enclos) : attempt to apply non-function
and no file is saved. (Instead of png, I also tried the extensions pdf, and jpeg).
I found in a forum that I should use the command: dev_mode() and has_devel()
the output of dev_mode is:
> dev_mode()
Dev mode: OFF
and
> has_devel()
/Library/Frameworks/R.framework/Resources/bin/R --vanilla CMD SHLIB foo.c
sh: make: command not found
Error: Command failed (1)
However, I don't know what to do with this feedback?
Can anyone help me with this problem? I think I used the same approach in the past on a PC and it worked without a problem. I'm wondering if it is connected to my installation on a mac?
Thanks a lot!
Addition: #DWin asked for the sessionInfo() output:
d> sessionInfo()
R version 2.15.1 (2012-06-22)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] C/en_US.UTF-8/C/C/C/C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] devtools_0.8 reshape2_1.2.1 plyr_1.7.1 ggplot2_0.9.2.1
loaded via a namespace (and not attached):
[1] MASS_7.3-18 RColorBrewer_1.0-5 RCurl_1.95-3 colorspace_1.2-0
[5] dichromat_1.2-4 digest_0.5.2 evaluate_0.4.2 grid_2.15.1
[9] gtable_0.1.1 httr_0.2 labeling_0.1 memoise_0.1
[13] munsell_0.4 parallel_2.15.1 proto_0.3-9.2 scales_0.2.2
[17] stringr_0.6.1 tools_2.15.1 whisker_0.1