I am having troubles with the Rstudio IDE and some packages, in particular right now: readxl.
I use conda environments with the prefix option (conda create -p /home/user/myproject/envs/default) to install all packages.
Therefore, if my conda environment is not active there is no system wide installation of R.
I activate the environment and install base R via 'conda install -c conda-forge r-base'. This retrieves R version 4.2.1 with the following error:
SafetyError: The package for r-base located at /home/user/miniconda3/pkgs/r-base-4.2.1-ha8c3e7c_1
appears to be corrupted. The path 'lib/R/doc/html/packages.html'
has an incorrect size.
reported size: 3423 bytes
actual size: 7734 bytes
but R still works fine.
Afterwards I install readxl via 'conda install -c r r-readxl'.
On the command line the program works just fine while in Rstudio i get the error message
Error in dyn.load(file, DLLpath = DLLpath, ...) :
unable to load shared object '/home/user/myproject/envs/default/lib/R/library/readxl/libs/readxl.so':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/user/myproject/envs/default/lib/R/library/readxl/libs/readxl.so)
My library path in R (.libPaths()) is
/home/user/myproject/envs/default/lib/R/library
and while /usr/lib/x86_64-linux-gnu/libstdc++.so.6 only has GLIBCXX_3.4.25
strings /usr/lib/x86_64-linux-gnu/libstdc++.so.6 | grep GLIBCXX_3.4.2
GLIBCXX_3.4.2
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
the default lib specified by readxl.so
ldd envs/default/lib/R/library/readxl/libs/readxl.so
libstdc++.so.6 => /home/user/myproject/envs/default/lib/R/library/readxl/libs/../../../../libstdc++.so.6 (0x00007f063bb82000)
has more versions of GLIBCXX including the requested 3.4.26).
strings /home/user/myproject/envs/default/lib/R/library/readxl/libs/../../../../libstdc++.so.6 | grep GLIBCXX_3.4.2
GLIBCXX_3.4.2
GLIBCXX_3.4.20
GLIBCXX_3.4.21
GLIBCXX_3.4.22
GLIBCXX_3.4.23
GLIBCXX_3.4.24
GLIBCXX_3.4.25
GLIBCXX_3.4.26
GLIBCXX_3.4.27
GLIBCXX_3.4.28
GLIBCXX_3.4.29
GLIBCXX_3.4.21
GLIBCXX_3.4.28
GLIBCXX_3.4.25
GLIBCXX_3.4.24
GLIBCXX_3.4.20
GLIBCXX_3.4.2
GLIBCXX_3.4.27
GLIBCXX_3.4.23
GLIBCXX_3.4.29
GLIBCXX_3.4.22
GLIBCXX_3.4.26
This happens not only for r-base=4.2.1 (I checked some others, all > 4) and r-readxl=1.4.0 (e.g. also for stringr).
I've reached the end of the line here and hope somebody can point me to a solution.
Best,
Oliver