can't install r-base 3.6.3 in linux mint - r

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?

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.

Related

How to downgrade R version in ubuntu 18.04

I installed R version 3.4.4-1ubuntu1 How do I downgrade to 3.2.2?
I tried this solution but it didn't work
sudo apt-get remove r-base-core
sudo apt-get autoremove
sudo apt-get install r-base-core=3.2.2

R-base could not be upgraded to 4.0: showing "r-base is already the newest version (3.4.4-1xenial0)"

I have tried to upgrade R from 3.4.4 to 4.0 in Ubuntu 16.04.7 LTS (Xenial Xerus). I have followed and run the following scripts.
$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu xenial-cran40/'
$ sudo apt-get update
$ sudo apt install r-base
Output:
"Reading package lists... Done
Building dependency tree
Reading state information... Done
r-base is already the newest version (3.4.4-1xenial0)".
The terminal always showed that "r-base is already the newest version" and refused to upgrade. I tried to upgrade R 3.6 as well and got a similar issue. Any thoughts? Thank you so much for your help.

How do I solve a dependency error that prevents me from installing R 4.0 on Ubuntu 18.04?

I'm trying to install R 4.0 on Ubuntu, but get this error:
$ sudo apt-get install r-base
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
r-base : Depends: r-base-core (>= 4.0.0-1.2004.0) but it is not going to be installed
Depends: r-recommended (= 4.0.0-1.2004.0) but it is not going to be installed
Recommends: r-base-html but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
I have run these commands to set up apt to receive R 4.0, as recommended at https://cran.r-project.org/bin/linux/ubuntu/README.html:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
sudo apt-get update
What am I doing wrong, and how can I fix it?
I did have R 3.4 installed on this system before, and removed it with
sudo apt-get remove r-*
sudo apt-get purge r-*
Have I screwed something up by doing that?
The error was, it turned out, entirely mine:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/'
added the repo for Ubuntu 20.04. I needed:
sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran40/'

Installing R and RStudio on Chromebook Samsung 3

I have been trying to but struggling to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. I can install R just fine but either can't install Rstudio at all or can get the icon for Rstudio to show up but nothing happens when I click on it. Can someone give me a process on how to install these effectively on my device?
UPDATE 2020:
I am no longer using Crouton, but rather the built in Linux option (Crostini). In the Linux terminal, I did the following:
sudo apt-get update; sudo apt-get upgrade; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
sudo apt install -y gnupg2
sudo apt-key adv --keyserver keys.gnupg.net --recv-key 'E19F5F87128899B192B1A2C2AD5F960A256A04AF'
sudo vi /etc/apt/sources.list
Add this line. Can use a different mirror if desired. (Note: older versions of Crostini were running Stretch by default instead of Buster)
deb http://cran.rstudio.com/bin/linux/debian buster-cran35/
Then back in the terminal
sudo apt-get install xclip
sudo apt install -y r-base r-base-dev
sudo apt-get install gdebi-core
sudo apt install -y libgstreamer1.0 libgstreamer-plugins-base1.0 libxslt-dev libnss3
sudo apt --fix-broken install
sudo curl -o rstudio.deb https://download1.rstudio.org/desktop/bionic/amd64/rstudio-1.2.5033-amd64.deb
sudo dpkg -i rstudio.deb
sudo apt-get update; sudo apt-get upgrade; sudo apt --fix-broken install; sudo apt-get update --fix-missing; sudo apt autoclean; sudo apt-get clean; sudo apt-get autoremove
ORIGINAL ANSWER:
It admittedly took me a long time, but I was finally able to install R and RStudio on my Chromebook Samsung 3. I have it set-up with Crouton with XFCE/Xiwi and use Trusty. After setting up Crouton, etc. here is what I had to do in the Linux terminal:
sudo apt-get install software-properties-common
sudo apt-get install selinux-policy-default
sudo apt-get install libqpol1
Add these lines:
deb https://<FOO>/bin/linux/ubuntu trusty/
deb https://<FOO>/ trusty-backports main restricted universe
to file
/etc/apt/sources.list
(replace FOO with the CRAN mirror of your choice and replace trusty if applicable)
Terminal:
sudo apt-get update
sudo apt-get install r-base
sudo apt-get install r-base-dev
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E084DAB9
sudo add-apt-repository ppa:marutter/rrutter
sudo apt update
sudo apt upgrade
sudo apt upgrade r-base r-base-dev
sudo apt-get install gdebi-core
wget https://download2.rstudio.org/rstudio-server-1.1.442-amd64.deb
sudo gdebi rstudio-server-1.1.442-amd64.deb
wget https://download1.rstudio.org/rstudio-0.99.896-amd64.deb
sudo apt-get install libxslt1-dev
sudo gdebi rstudio-0.99.896-amd64.deb
cd /usr/bin/
rstudio
source
source
source
source

Why does apt-get install r-base install 3.2.3 instead of 3.4.0 in R?

I am trying to install the latest version of R (3.4.0) due to some incompatibility issues with dowloading of a package called "Slam". I have downloaded the tar.gz file of 3.4.0 but there are some issues with the make file for installation.
I have uninstalled the r-base of 3.2.3. Now when I'm installing R again, I get the same version instead of the upgrade version. I even ran the sudo apt-get update command but in vain.
you need to install from the CRAN repos not the ubuntu ones. add the key, then the repository, update and the apt-get
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/'
sudo apt-get update
sudo apt-get install r-base

Resources