#+title: How to install R from source in GNU linux distributions #+date: 2022-05-28 You may follow the manual on the topic "installing R under Unix-alike". You can download the source from: https://cran.r-project.org/sources.html #+begin_example sh wget https://cran.r-project.org/src/base/R-4/R-4.2.0.tar.gz #+end_example Then, use "tar" to extract the source and build it. Suppose that you are installing R 4.2: #+begin_example sh tar -xf R-4.2.0.tar.gz #+end_example Go to a directory where you will install R. The path shouldn't contain spaces. #+begin_example sh ./configure make #+end_example #+begin_example sh make check #+end_example If you want to install all the R tree (binaries, manuals, libraries...): #+begin_example sh make install #+end_example To install packages in R, you can use the function "install.packages()" with the name of the file ('...tar.gz') to be installed and the argument "repos" set as "NULL" You can also install the packages from a shell: #+begin_example R R CMD INSTALL -l /path/to/library packagename #+end_example You may also be interested in looking at this information: - https://cran.r-project.org/bin/linux/redhat/ - https://cran.r-project.org/sources.html - The R manual describes how to install R from source in: - R-admin > Obtaining R > Getting and unpacking the sources - R-admin > Installing R under Unix-alikes