Error when installing libraries in RSudio/Jupyterhub

Good afternoon,

My name is Myrto Mitletton of the compdevneuro team of Dr. Konstantinidis Lab (IJM).

I recently started using the RStudio in jupyterhub and I am having some problems with installing some of the libraries I need. Specifically, library(rliger) and library(geomnet).

For rliger:

install.packages(‘rliger’)
library(rliger)

I get the following error:

Hello,

Your message seems truncated, I don’t have the error message.

Best.

Hello again,
My apologies.

Here is the error:

I am also adding it bellow in case you need to copy-paste anything:

  • installing source package ‘sccore’ …
    ** package ‘sccore’ successfully unpacked and MD5 sums checked
    ** using staged installation
    ** libs
    x86_64-conda-linux-gnu-c++ -std=gnu++14 -I"/shared/software/conda/envs/r-4.2.3/lib/R/include" -DNDEBUG -I’/shared/software/conda/envs/r-4.2.3/lib/R/library/Rcpp/include’ -I’/shared/software/conda/envs/r-4.2.3/lib/R/library/RcppArmadillo/include’ -I’/shared/software/conda/envs/r-4.2.3/lib/R/library/RcppProgress/include’ -I’/shared/software/conda/envs/r-4.2.3/lib/R/library/RcppEigen/include’ -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /shared/software/conda/envs/r-4.2.3/include -I/shared/software/conda/envs/r-4.2.3/include -Wl,-rpath-link,/shared/software/conda/envs/r-4.2.3/lib -I"…/inst/include" -fpic -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /shared/software/conda/envs/r-4.2.3/include -fdebug-prefix-map=/home/conda/feedstock_root/build_artifacts/r-base-split_1678912227145/work=/usr/local/src/conda/r-base-4.2.3 -fdebug-prefix-map=/shared/software/conda/envs/r-4.2.3=/usr/local/src/conda-prefix -c RcppExports.cpp -o RcppExports.o
    /bin/sh: 1: x86_64-conda-linux-gnu-c++: not found
    make: *** [/shared/software/conda/envs/r-4.2.3/lib/R/etc/Makeconf:178: RcppExports.o] Error 127
    ERROR: compilation failed for package ‘sccore’
  • removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/sccore’
    Warning in install.packages :
    installation of package ‘sccore’ had non-zero exit status
  • installing source package ‘hdf5r’ …
    ** package ‘hdf5r’ successfully unpacked and MD5 sums checked
    ** using staged installation
    checking for a sed that does not truncate output… /shared/software/conda/envs/r-4.2.3/bin/sed
    checking for gawk… no
    checking for mawk… mawk
    checking for grep that handles long lines and -e… /usr/bin/grep
    checking for gcc… x86_64-conda-linux-gnu-cc
    checking whether the C compiler works… no
    configure: error: in /tmp/RtmpYRYHXL/R.INSTALL38f56875538a/hdf5r': configure: error: C compiler cannot create executables See config.log’ for more details
    ERROR: configuration failed for package ‘hdf5r’
  • removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/hdf5r’
    Warning in install.packages :
    installation of package ‘hdf5r’ had non-zero exit status
    ERROR: dependency ‘sccore’ is not available for package ‘leidenAlg’
  • removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/leidenAlg’
    Warning in install.packages :
    installation of package ‘leidenAlg’ had non-zero exit status
    ERROR: dependencies ‘hdf5r’, ‘leidenAlg’ are not available for package ‘rliger’
  • removing ‘/shared/home/mitletton/R/x86_64-conda-linux-gnu-library/4.2/rliger’
    Warning in install.packages :
    installation of package ‘rliger’ had non-zero exit status

The downloaded source packages are in
‘/tmp/RtmpDASY0W/downloaded_packages

Hello,

I am no R expert but it looks like the PATH variable is not correctly set. Try the following:

path <- Sys.getenv("PATH")
Sys.setenv(PATH = paste(path, "/shared/software/conda/envs/r-4.2.3/bin", sep = ":"))
install.packages("rliger")

Good morning,

I tried your suggestion and it works now.
Thank you very much for your help.

Have a good day.

Myrto Mitletton