Search code examples
rlinuxlinux-mint

can't install r-base 3.6.3 in linux mint


If I run this

sudo apt-get install r-base

R 3.4 is installed from the ubuntu repo. So I added the CRAN repositories by doing

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

but then I get

 The following packages have unmet dependencies:
 r-base: Depends: r-base-core (> = 3.6.3-1eoan) but 3.4.4-1ubuntu1 is going to be installed
         Depends: r-recommended (= 3.6.3-1eoan) but 3.4.4-1ubuntu1 is going to be installed
E: Problems cannot be corrected, you have retained broken packages.

I swear I tried every line of code from every forum I found but nothing solved this issue. I tried:

sudo apt update && sudo apt-get autoclean && sudo apt-get clean && sudo apt-get autoremove
sudo apt install --fix-broken
sudo apt-get install -f
sudo apt dist-upgrade -y
sudo apt full-upgrade

I also tried disabling ubuntu repos and use only the CRAN repositories, but it doesnt work. I tried installing r-base 3.4 and upgrading from that but nothing.

I really don't know what else to do, any ideas?


Solution

  • It depend of the version of Linux Mint you are running, but based on your code, you are trying to install r-base for Ubuntu 19.10 eoan (which is not a LTS).

    The last version of Linux Mint 19.3 is based on Ubuntu 18.04 Bionic, so you should edit your /etc/apt/sources.list file and add

    deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
    

    Then:

    sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
    sudo apt-get update
    sudo apt-get upgrade
    sudo apt-get install r-base-dev
    

    All informations from cran are here: https://cran.r-project.org/

    For Linux Mint, check this page (https://www.linuxmint.com/rel_tricia_xfce_whatsnew.php):

    > Linux Mint 19.3 features Xfce 4.14, a Linux kernel 5.0 and an Ubuntu 18.04 package base.