How to install R on Ubuntu 24.04

Ubuntu 24.04, also known as Noble Numbat, has been recently released. Ubuntu fans have already started upgrading their systems from Ubuntu 22.04 to Ubuntu 24.04. The R team has also released its package, noble-cran40, for Ubuntu 24.04. If you’re planning to install the latest R on Ubuntu 24.04, the process is quite simple. In this post, I will show you all the necessary steps for the installation.

Here are the steps:

  • Since apt-key has been deprecated, you need to run the following command on the terminal to add the key:
wget -qO- | sudo tee -a /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc
  • After executing the above command, you can verify the key by running the following command on the terminal:
gpg --show-keys /etc/apt/trusted.gpg.d/cran_ubuntu_key.asc

The fingerprint should be E298A3A825C0D65DFD57CBB651716619E084DAB9.

  • Next, create a new file named ‘r-release.list‘ with the following command:
sudo nano /etc/apt/sources.list.d/r-release.list
  • Add the following entry to the file to obtain the latest R4.4 packages:
deb noble-cran40/
  • Finally, to install the complete R system, use the following commands:
sudo apt-get update 
sudo apt-get install r-base 

That’s it! You have successfully installed the latest R on your Ubuntu 24.04 system. Please let me know in the comments if you find any issues.

Reference: cran-r

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.