I'm running Miniconda3 on Ubuntu 20.04 LTS OS and have installed R-4.0.3 in a conda environment. When I try to install packages from CRAN repositoriesvia R prompt, I get a
x86_64-conda-linux-gnu-c++: not found
I have ran source activate qwe (qwe is the name of the environment) as advised in Anaconda documentation on built-in gcc tool chain. I also ran source activate root
I have also installed the comiler tool chain using conda install gxx_linux-64
My echo $PATH returns the following:
/home/sreedta/miniconda3/envs/qwe/bin:/home/sreedta/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
Here is the full output when I tried to install a package called bayesm
install.packages("bayesm") --- Please select a CRAN mirror for use in this session --- trying URL 'https://cloud.r-project.org/src/contrib/bayesm_3.1-4.tar.gz' Content type 'application/x-gzip' length 2269364 bytes (2.2 MB) ================================================== downloaded 2.2 MB
- installing source package ‘bayesm’ ... ** package ‘bayesm’ successfully unpacked and MD5 sums checked ** using staged installation ** libs x86_64-conda-linux-gnu-c++ -std=gnu++11 -I"/home/sreedta/miniconda3/envs/qwe/lib/R/include" -DNDEBUG -I../inst/include/ -I'/home/sreedta/miniconda3/envs/qwe/lib/R/library/Rcpp/include' -I'/home/sreedta/miniconda3/envs/qwe/lib/R/library/RcppArmadillo/include' -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/sreedta/miniconda3/envs/qwe/include -I/home/sreedta/miniconda3/envs/qwe/include -Wl,-rpath-link,/home/sreedta/miniconda3/envs/qwe/lib -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/sreedta/miniconda3/envs/qwe/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base_1603047469992/work=/usr/local/src/conda/r-base-4.0.3 -fdebug-prefix-map=/home/sreedta/miniconda3/envs/qwe=/usr/local/src/conda-prefix -c RcppExports.cpp -o RcppExports.o /bin/sh: 1: x86_64-conda-linux-gnu-c++: not found make: *** [/home/sreedta/miniconda3/envs/qwe/lib/R/etc/Makeconf:180: RcppExports.o] Error 127 ERROR: compilation failed for package ‘bayesm’
- removing ‘/home/sreedta/miniconda3/envs/qwe/lib/R/library/bayesm’
- restoring previous ‘/home/sreedta/miniconda3/envs/qwe/lib/R/library/bayesm’
The downloaded source packages are in ‘/tmp/Rtmp6hsphd/downloaded_packages’ Updating HTML index of packages in '.Library' Making 'packages.html' ... done Warning message: In install.packages("bayesm") : installation of package ‘bayesm’ had non-zero exit status