6

I recently upgraded to F24, and now in my R session I cannot get a few packages to load, sp. reshape2, latex2exp, knitr, and others.

The initial problem I found was that F24 uses libicu56 whereas these packages expect libicu54. I followed a suggestion in this thread to set the symbolic links with the desired version:

ln -s /usr/lib64/libicui18n.so.56 /usr/lib64/libicui18n.so.54    
ln -s /usr/lib64/libicuuc.so.56 /usr/lib64/libicuuc.so.54
ln -s /usr/lib64/libicudata.so.56 /usr/lib64/libicudata.so.54

That initial error went away, but now I have this:

Error in dyn.load(file, DLLpath = DLLpath, ...) : 
   unable to load shared object '/home/uname/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so':
  /home/uname/R/x86_64-redhat-linux-gnu-library/3.3/stringi/libs/stringi.so: undefined symbol: _ZTIN6icu_548ByteSinkE

This leads me to the stringi package for R, but I cannot get it to load - it gives the same error.

I have updated F24 and all the R packages as well.

Any ideas?

Billal Begueradj
  • 20,717
  • 43
  • 112
  • 130
KirkD-CO
  • 1,603
  • 1
  • 22
  • 35

2 Answers2

6

I was able to install the package stringi on fedora 24 by downloading the tar.gz package from CRAN and then run the following command:

R CMD INSTALL stringi_1.1.1.tar.gz --configure-args='--disable-pkg-config'
Stefano
  • 61
  • 1
  • ... just to give more visibility to this answer, this is the only fix I found with version 1.4.6 + Linux and after trying multiple solutions. full line was `install.packages("stringi_1.4.7.tar.gz", repos = NULL, type = "source", dependencies = TRUE, INSTALL_opts = '--no-lock', configure.args='--disable-pkg-config') ` – Andrés Parada Jul 01 '20 at 19:29
2

That just happened to me following an update of icu (Gentoo). Another solution is to remove and install again stringi, as it is looking for a specific library file that does not exist anymore.

remove.packages('stringi')
install.packages('stringi')

If your .Rprofile triggers library(stringi), then you must start a session using R --vanilla in order to do this, else it will keep failing.

The other solution with --disable-pkg-config works as well. It will make stringi build icu for itself rather than rely on the system's (the source ships with a copy of icu).

pbarill
  • 640
  • 8
  • 16