rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.44k stars 273 forks source link

Restarting Container, Unable to find packages #233

Closed james-ingold closed 7 years ago

james-ingold commented 7 years ago

Hello,

I'm running the rstudio container on my QNAP Nas to run some baseball statistics. I installed a few more containers to the container station which I think restarted the containers, now I'm getting some errors in rstudio. This happened previously with the rstudio container, I ended up having to re-install the container and set it all up again. When I try to reinstall a package that it can't find, I get "Skipping install of 'openWAR' from a github remote, the SHA1 (ff09decb) has not changed since last install. Use force = TRUE to force installation"

I get unable to find package errors and that packages are built under a different version of R? I originally installed the packages in the rstudio ui. Is there a way to fix this?

Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared object '/usr/local/lib/R/site-library/dplyr/libs/dplyr.so': /usr/local/lib/R/site-library/dplyr/libs/dplyr.so: undefined symbol: Rf_installChar In addition: Warning messages: 1: In fun(libname, pkgname) : bytecode version mismatch; using eval 2: package ‘RMySQL’ was built under R version 3.3.3 3: package ‘DBI’ was built under R version 3.3.3 4: package ‘openWAR’ was built under R version 3.3.3 Error: package or namespace load failed for ‘openWAR’

and in the console log in container station: [s6-finish] sending all processes the TERM signal.
[s6-finish] sending all processes the KILL signal and exiting.
[fix-attrs.d] applying owners & permissions fixes...
[fix-attrs.d] 00-runscripts: applying...
[fix-attrs.d] 00-runscripts: exited 0.
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] conf: executing...
[cont-init.d] conf: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
26 Apr 2017 11:26:12 [rsession-rstudio] ERROR r error 4 (R code execution error) [errormsg=Error: package or namespace load failed for ‘openWAR’
, context=Error restoring session data (loading package openWAR)]; OCCURRED AT: rstudio::core::Error rstudio::r::exec::{anonymous}::evaluateExpressionsUnsafe(SEXP, SEXP, SEXPREC*, rstudio::r::sexp::Protect, rstudi o::r::exec::{anonymous}::EvalType) /home/ubuntu/rstudio/src/cpp/r/RExec.cpp:159; LOGGED FROM: void rstudio::r::session::search_path::{anonymous}::loadPackage(const string&, const string&) /home/ubuntu/rstudio/src/cp p/r/session/RSearchPath.cpp:198

I also tried to update packages and get asked to create a personal library? update.packages(ask = FALSE) Warning: package 'DBI' in library '/usr/lib/R/site-library' will not be updated Warning: package 'RMySQL' in library '/usr/lib/R/site-library' will not be updated Warning: package 'cluster' in library '/usr/lib/R/library' will not be updated Warning: package 'foreign' in library '/usr/lib/R/library' will not be updated Warning: package 'KernSmooth' in library '/usr/lib/R/library' will not be updated Warning: package 'lattice' in library '/usr/lib/R/library' will not be updated Warning: package 'MASS' in library '/usr/lib/R/library' will not be updated Warning: package 'Matrix' in library '/usr/lib/R/library' will not be updated Warning: package 'mgcv' in library '/usr/lib/R/library' will not be updated Warning: package 'nlme' in library '/usr/lib/R/library' will not be updated Warning: package 'nnet' in library '/usr/lib/R/library' will not be updated Warning: package 'rpart' in library '/usr/lib/R/library' will not be updated Warning: package 'survival' in library '/usr/lib/R/library' will not be updated Warning in install.packages(update[instlib == l, "Package"], l, contriburl = contriburl, : 'lib = "/usr/lib/R/library"' is not writable Would you like to use a personal library instead? (y/n)

james-ingold commented 7 years ago

Looks like my R version got messed up somehow, it was using 3.1.1 in rstudio. Updated the config to use the right version and things are good. rsession-which-r=/usr/local/bin/R