GNU/Linux Ubuntu R Repository Adding
Hi! The Tutorial shows you Step-by-Step How to Add R Repository in Ubuntu 16.04+ GNU/Linux Based OSes.
And R for Ubuntu is a Free Software Environment for Statistical Computing and Graphics.
Especially relevant: only the Latest LTS Based Versions are fully supported.
So this Repo Setup is Valid for All the Ubuntu-based Distros like:
- Linux Mint
- Lubuntu
- Kubuntu
- Xubuntu
- Zorin OS
- Pop_OS!
- Elementary OS
- Kde Neon
- Linux Lite
- Bodhi Linux
- Q4OS
- Trisquel
- LXLE
- feren OS
- Peppermint
- Voyager Ubuntu
- Linux Ultimate Edition
Finally, the Guide include also instructions to Add CRAN Repository that contains more than 5000 R Packages.
1. Launching Terminal
How to QuickStart with Command Line on Ubuntu:
3. Installing Dependencies
Then to Install Required Software
First, Update the Indices with:sudo apt update -qq
And then run:sudo apt install --no-install-recommends software-properties-common dirmngr
Authenticate with the User Admin Pass.
If Got “User is Not in Sudoers file” then see: How to Enable sudo.4. Adding R GPG Key
Again to Add R GPG Signature Key
Do:wget -qO- https://cloud.r-project.org/bin/linux/ubuntu/marutter_pubkey.asc | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
5. Adding R Repo
Then to Add R Repository for Ubuntu
Execute:sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu $(lsb_release -cs)-cran40/"
Authenticate with the User’s Admin Pass.
If Got “User is Not in Sudoers file” then see: How to Enable sudo.
The $(lsb_release -cs) Command in the Repo Setup is outputting the Ubuntu Release.
So for the Derivative you have to amend the instruction Consequently, using the Ubuntu base.
For instance on Mint 20, Zorin OS 16, Elementary OS 6,… you have to use:sudo add-apt-repository "deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/"
Again, for the latest Ubuntu release you may have to amend the Repo manually.
Using the nano Editor like:sudo nano /etc/sources.list.d/*-cran40.list
So for example you may have to change “impish” in “hirsute”.
Ctrl+x to Save & Exit from nano Editor.
Last, update the Repository again as in the next Step.6. Refreshing Ubuntu Repo Sources
Next to Refresh Ubuntu Apt Repository Sources
Needed for most Ubuntu derivatives:sudo apt update
7. Adding CRAN PPA
Last, to Add CRAN Repository
Simply play:add-apt-repository ppa:c2d4u.team/c2d4u4.0+
Contents