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

stringi fails to load in 4.0.0 #221

Closed zdk123 closed 4 years ago

zdk123 commented 4 years ago
> library(stringi)
Error: package or namespace load failed for ‘stringi’ in dyn.load(file, DLLpath = DLLpath, ...):
 unable to load shared object '/usr/local/lib/R/site-library/stringi/libs/stringi.so':
  libicui18n.so.60: cannot open shared object file: No such file or directory

It looks like libicu 60 is needed for stringi, but focal only has version 66 available.

eddelbuettel commented 4 years ago

Try bionic -- found via packages.ubuntu.com.

zdk123 commented 4 years ago

Sorry for the lack of detail in my original post: I'm running this command in an interactive session in a rocker/tidyverse:4.0.0 container (pulled from docker hub).

The base OS seems to be focal, so I don't expect stringi will work unless version icu60 is re-built from source.

eddelbuettel commented 4 years ago

In a shell session in the same container (i.e. not from R) do

  1. run ldd on the file ldd /usr/local/lib/R/site-library/stringi/libs/stringi.so
  2. it will identify the same missing library
  3. use (maybe install) wget or curl to download http://security.ubuntu.com/ubuntu/pool/main/i/icu/libicu60_60.2-3ubuntu3.1_amd64.deb (from the link I gave)
  4. run dpkg -i libicu60_60.2-3ubuntu3.1_amd64.deb as root
  5. redo step 1; it will now resolve the libicu60 library
  6. In R, you can now do library(stringi).

Edit: Of course, one never knows. The to-be installed file may depend on another which you'd also need etc, but I have had good luck with this method.

cboettig commented 4 years ago

@zdk123 thanks for the report. Yup, looks like we will need to stick with the source installs on focal at least until RSPM rolls out for focal.

cboettig commented 4 years ago

should be fixed since we are now on focal RSPMs... (and have been for some time! sorry for the much belated reply)