rocker-org / rocker-versioned

Run current & prior versions of R using docker
https://hub.docker.com/r/rocker/r-ver
GNU General Public License v2.0
297 stars 169 forks source link

.onLoad failed in loadNamespace() for 'tcltk' in rocker/rstudio #254

Closed jozefhajnala closed 3 years ago

jozefhajnala commented 3 years ago

Hello!

When running (on Ubuntu 18.04.5 LTS) with "rocker/rstudio@sha256:6587343e957c4f215be7226412c4cb92d5ea31d2048bbd592b7d5cfa32f13eab"

docker run --rm -it rocker/rstudio Rscript -e 'library("tcltk")'

I get

Error: package or namespace load failed for ‘tcltk’:
 .onLoad failed in loadNamespace() for 'tcltk', details:
  call: dyn.load(file, DLLpath = DLLpath, ...)
  error: unable to load shared object '/usr/local/lib/R/library/tcltk/libs/tcltk.so':
  libtcl8.6.so: cannot open shared object file: No such file or directory

Is this intended?

Thank you!

cboettig commented 3 years ago

yup, packages which bind additional libraries will need those libraries installed. If you'd like more packages to work out of the box, you can try a more 'batteries included' image like rocker/geospatial (which also has RStudio installed). rocker/rstudio is a relatively more minimal configuration

eddelbuettel commented 3 years ago

As an aside that doesn't quite "match" here because of the 'at point in time' philosophy of the versioned stack, "normal" deployment on Debian or Ubuntu using r-cran-tcltk would of course bring the libraries in. So this really is a "feature" of the versioned stack.