Setup R on Ubuntu
Setup R on Ubuntu
This post is from 2018 and may be out of date. The
rrutter3.5PPA has long been superseded; see CRAN’s Ubuntu instructions.
from Michael Rutter, Stack Overflow, and (of course) trial and error
Installing and setting up R on Ubuntu can be a frustrating experience due to multiple system dependencies.
Install R from a Personal Package Archive by Michael Rutter
Check for the current version here before the installation.
1
2
$ sudo add-apt-repository ppa:marutter/rrutter3.5
$ sudo apt-get update
Install Key Package Dependencies
In Windows, external R package dependencies (except Java) are installed automatically, and users are frequently unaware what is happening behind the scenes.
In a linux environment, the same dependencies require explicit installation via the linux package manager.
- Install Java
1
$ sudo apt-get install default-jre
- Install Curl
1
$ sudo apt-get install libcurl4-openssl-dev
In the future, check for the current curl version:
1
$ apt-cache search libcurl
- Install OpenSSL
1
$ sudo apt-get install libssl-dev
- Install LibXML
1
$ sudo apt-get install libxml2-dev
This post is licensed under CC BY 4.0 by the author.