rocker-org / rocker

R configurations for Docker
https://rocker-project.org
GNU General Public License v2.0
1.45k stars 273 forks source link

r: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory #538

Open ChillyMomo709 opened 6 months ago

ChillyMomo709 commented 6 months ago

Hi all,

I got an issue with installing packages in rocker/rstudio:4.3.1

install2.r --deps NA --error --skipinstalled --ncpus -1 BiocManager rstudioapi remotes languageserver aws.s3 usethis
r: error while loading shared libraries: libR.so: cannot open shared object file: No such file or directory
ERROR: process "/bin/sh -c /install_scripts/setup_r.sh" did not complete successfully: exit code: 127

Dockerfile

FROM rocker/rstudio:4.3.1

ENV \
    # R repositories and versions \
    CRAN_REPO="https://packagemanager.posit.co/cran/__linux__/jammy/2024-02-01/" \
    BIOC_REPO="https://ftp.gwdg.de/pub/misc/bioconductor/" \
    BIOC_VERSION="3.18" \

COPY ./install_scripts/setup_r.sh /install_scripts/setup_r.sh
RUN /install_scripts/setup_r.sh

install_scripts/setup_r.sh

#!/bin/bash
# setup R and install Bioconductor

set -e # exit script on error (non-zero exit status)
set -x # print command trace
set -u # exit when undeclared variables are used

# build ARGs
NCPUS=${NCPUS:--1}

# set the RStudio Package Manager repositories for CRAN (overrides CRAN set
# by rocker) and bioconductor and increase download timeout
echo "options(repos = c(CRAN = '${CRAN_REPO}'), BioC_mirror = '${BIOC_REPO}',
      download.file.method = 'libcurl', timeout = 600)" >> \
          ${R_HOME}/etc/Rprofile.site

# update all base R packages
/usr/local/lib/R/site-library/littler/examples/update.r --ncpus ${NCPUS:--1}

# setup bioconductor
install2.r --deps "NA" --error --skipinstalled --ncpus ${NCPUS:--1} \
    BiocManager \
    rstudioapi \
    remotes \
    languageserver \
    aws.s3 \
    usethis