[SOLVED]Unable to install R >3.5 into Linux Mint 19.1 "Tessa" (Ubuntu Bionic)

To all my colleagues,

I have just migrated to linux OS from Windows. The OS I chose is Linux Mint 19.1 "Tessa". The built in R for the version is 3.4.4.

With that said, 3.4.4 has many incompatible packages (such as "car"), which often are prerequisite for subsequent packages. I have tried to look for ways to circumvent this problem, but there are quite a lot of packages which are only R =>3.5 compatible. Even some do not have archive for R <3.5.

I also looked into ways to remove (purge) R 3.4.4 from my system, but to no avail as a lot of the dir is different from ubuntu. Some Linux Mint forums also mentioned the instability of R > 3.5

May I know anyone using LinuxMint that has successfully upgrade to R >3.5? If so, can anyone please guide me to do it? Or is there anyway to circumvent this issue?

Thank you very much for your attention.

Cheers,
Boo

Since Linux Mint is based on Ubuntu Bionic I think you can install the latest R version by adding the CRAN repository for Ubuntu to your sources.list file, run these commands in your system terminal.

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
1 Like

Thank you very much sir!
It worked well,
but the first line is different for Linux Mint as the terminal use another type of library

Here I include the Linux Mint 19.1 script for installing R 3.6.1

echo -e "\ndeb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/" | sudo tee -a /etc/apt/sources.list
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev

Thank you very much!
Cheers,
Boo

2 Likes

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.