I find that when I try to load some packages in a conda environement, when using rstudio (but not when I'm using R directly), I get an error message about a missing Rcpp.so file.
I activate my conda environment (which is running R version 4.1), open RStudio (which I installed independently of the conda environment), I have no problem installing say the glmnet
package with
`install.packages("glmnet")
however
library(glmnet)
returns
Loading required package: Matrix
Error: package or namespace load failed for ‘glmnet’ in dyn.load(file, DLLpath = DLLpath, ...):
unable to load shared object '/home/jacob/miniconda3/envs/r41/lib/R/library/Rcpp/libs/Rcpp.so':
/usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.26' not found (required by /home/jacob/miniconda3/envs/r41/lib/R/library/Rcpp/libs/Rcpp.so)
However, if I close out of rstudio and run R from the terminal
> library(glmnet)
Loading required package: Matrix
Loaded glmnet 4.1-3
I thought maybe installing rstudio through conda might help, but that lead me to this issue, where I was advised not to use conda rstudio.
I sure would like to use conda, because it seems to be the easist way to install multiple versions of R on my computer, and I'd like to use rstudio for the usual reasons. Any advice for getting these to play together? BTW, running rstudio not in the conda environment, I can load glmnet just fine.
This thread looks like a similar problem in Jupyter. However the suggestions to not use conda don't help me, and the one to try conda install r-rcpp
has no effect.
My conda environment has the following installed:
# packages in environment at /home/jacob/miniconda3/envs/r41:
#
# Name Version Build Channel
_libgcc_mutex 0.1 conda_forge conda-forge
_openmp_mutex 4.5 1_gnu conda-forge
_r-mutex 1.0.1 anacondar_1 conda-forge
binutils_impl_linux-64 2.36.1 h193b22a_2 conda-forge
binutils_linux-64 2.36 hf3e587d_6 conda-forge
bwidget 1.9.14 ha770c72_1 conda-forge
bzip2 1.0.8 h7f98852_4 conda-forge
c-ares 1.18.1 h7f98852_0 conda-forge
ca-certificates 2021.10.8 ha878542_0 conda-forge
cairo 1.16.0 ha00ac49_1009 conda-forge
curl 7.82.0 h2283fc2_0 conda-forge
expat 2.4.7 h27087fc_0 conda-forge
font-ttf-dejavu-sans-mono 2.37 hab24e00_0 conda-forge
font-ttf-inconsolata 3.000 h77eed37_0 conda-forge
font-ttf-source-code-pro 2.038 h77eed37_0 conda-forge
font-ttf-ubuntu 0.83 hab24e00_0 conda-forge
fontconfig 2.13.96 h8e229c2_1 conda-forge
fonts-conda-ecosystem 1 0 conda-forge
fonts-conda-forge 1 0 conda-forge
freetype 2.10.4 h0708190_1 conda-forge
fribidi 1.0.10 h36c2ea0_0 conda-forge
gcc_impl_linux-64 9.4.0 h03d3576_13 conda-forge
gcc_linux-64 9.4.0 h391b98a_6 conda-forge
gettext 0.19.8.1 h73d1719_1008 conda-forge
gfortran_impl_linux-64 9.4.0 h0003116_13 conda-forge
gfortran_linux-64 9.4.0 hf0ab688_6 conda-forge
graphite2 1.3.13 h58526e2_1001 conda-forge
gsl 2.7 he838d99_0 conda-forge
gxx_impl_linux-64 9.4.0 h03d3576_13 conda-forge
gxx_linux-64 9.4.0 h0316aca_6 conda-forge
harfbuzz 3.4.0 hb4a5f5f_0 conda-forge
icu 69.1 h9c3ff4c_0 conda-forge
jbig 2.1 h7f98852_2003 conda-forge
jpeg 9e h7f98852_0 conda-forge
kernel-headers_linux-64 2.6.32 he073ed8_15 conda-forge
keyutils 1.6.1 h166bdaf_0 conda-forge
krb5 1.19.2 h08a2579_4 conda-forge
ld_impl_linux-64 2.36.1 hea4e1c9_2 conda-forge
lerc 3.0 h9c3ff4c_0 conda-forge
libblas 3.9.0 13_linux64_openblas conda-forge
libcblas 3.9.0 13_linux64_openblas conda-forge
libcurl 7.82.0 h2283fc2_0 conda-forge
libdeflate 1.10 h7f98852_0 conda-forge
libedit 3.1.20191231 he28a2e2_2 conda-forge
libev 4.33 h516909a_1 conda-forge
libffi 3.4.2 h7f98852_5 conda-forge
libgcc-devel_linux-64 9.4.0 hd854feb_13 conda-forge
libgcc-ng 11.2.0 h1d223b6_13 conda-forge
libgfortran-ng 11.2.0 h69a702a_13 conda-forge
libgfortran5 11.2.0 h5c6108e_13 conda-forge
libglib 2.70.2 h174f98d_4 conda-forge
libgomp 11.2.0 h1d223b6_13 conda-forge
libiconv 1.16 h516909a_0 conda-forge
liblapack 3.9.0 13_linux64_openblas conda-forge
libnghttp2 1.47.0 he49606f_0 conda-forge
libopenblas 0.3.18 pthreads_h8fe5266_0 conda-forge
libpng 1.6.37 h21135ba_2 conda-forge
libsanitizer 9.4.0 h79bfe98_13 conda-forge
libssh2 1.10.0 ha35d2d1_2 conda-forge
libstdcxx-devel_linux-64 9.4.0 hd854feb_13 conda-forge
libstdcxx-ng 11.2.0 he4da1e4_13 conda-forge
libtiff 4.3.0 h542a066_3 conda-forge
libuuid 2.32.1 h7f98852_1000 conda-forge
libwebp-base 1.2.2 h7f98852_1 conda-forge
libxcb 1.13 h7f98852_1004 conda-forge
libxml2 2.9.12 h885dcf4_1 conda-forge
libzlib 1.2.11 h36c2ea0_1013 conda-forge
lz4-c 1.9.3 h9c3ff4c_1 conda-forge
make 4.3 hd18ef5c_1 conda-forge
ncurses 6.2 h58526e2_4 conda-forge
openssl 3.0.0 h7f98852_2 conda-forge
pango 1.50.5 h4dcc4a0_0 conda-forge
pcre 8.45 h9c3ff4c_0 conda-forge
pcre2 10.37 h032f7d1_0 conda-forge
pixman 0.40.0 h36c2ea0_0 conda-forge
pthread-stubs 0.4 h36c2ea0_1001 conda-forge
r-base 4.1.2 h2553ce4_1 conda-forge
r-curl 4.3.2 r41hcfec24a_0 conda-forge
readline 8.1 h46c0cb4_0 conda-forge
sed 4.8 he412f7d_0 conda-forge
sysroot_linux-64 2.12 he073ed8_15 conda-forge
tk 8.6.12 h27826a3_0 conda-forge
tktable 2.10 hb7b940f_3 conda-forge
xorg-kbproto 1.0.7 h7f98852_1002 conda-forge
xorg-libice 1.0.10 h7f98852_0 conda-forge
xorg-libsm 1.2.3 hd9c2040_1000 conda-forge
xorg-libx11 1.7.2 h7f98852_0 conda-forge
xorg-libxau 1.0.9 h7f98852_0 conda-forge
xorg-libxdmcp 1.1.3 h7f98852_0 conda-forge
xorg-libxext 1.3.4 h7f98852_1 conda-forge
xorg-libxrender 0.9.10 h7f98852_1003 conda-forge
xorg-libxt 1.2.1 h7f98852_2 conda-forge
xorg-renderproto 0.11.1 h7f98852_1002 conda-forge
xorg-xextproto 7.3.0 h7f98852_1002 conda-forge
xorg-xproto 7.0.31 h7f98852_1007 conda-forge
xz 5.2.5 h516909a_1 conda-forge
zlib 1.2.11 h36c2ea0_1013 conda-forge
zstd 1.5.2 ha95c52a_0 conda-forge