CH-Earth / gistool

gistool: Static Data Processing tool for HPCs
GNU General Public License v3.0
2 stars 2 forks source link

Installation of `renv` on CC Graham is by default non-writeable #3

Closed kasra-keshavarz closed 2 years ago

kasra-keshavarz commented 2 years ago

Versions


Issue

Below is the error message:

Warning in install.packages(renv_source_package, repos = NULL, type = "source",  :
  'lib = "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/r/4.1.2/lib64/R/library"' is not writable
Error in install.packages(renv_source_package, repos = NULL, type = "source",  :
  unable to install packages
Execution halted
Warning in install.packages(renv_source_package, repos = NULL, type = "source",  :
  'lib = "/cvmfs/soft.computecanada.ca/easybuild/software/2020/avx2/Core/r/4.1.2/lib64/R/library"' is not writable
Error in install.packages(renv_source_package, repos = NULL, type = "source",  :
  unable to install packages
Execution halted

Most possibly, it is due to the fact that users have not run R before and therefore, the default installation path is set to an non-writeable path. In interactive mode, users are usually prompted to choose a local path to install the package, however, since the installation is run within an R script, choosing a local path is not feasible.


Probable Solution

Perhaps, as discussed here, the best approach to solve the issue is to choose the R_LIBS_USER variable to a local directory and then run the script.

kasra-keshavarz commented 2 years ago

Solved with 44d0c4e50485a00bad70829d04c705e169ff81b4