R 3.6 for Linux Mint 19.1

Write tutorials here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
Post Reply
erzebet
Level 1
Level 1
Posts: 3
Joined: Mon May 27, 2019 3:25 pm

R 3.6 for Linux Mint 19.1

Post by erzebet » Mon May 27, 2019 4:46 pm

After a whole day trying to install R 3.6 on Linux Mint 19.1 based on many tutorials that didn't work for me, I bring to you:

THE REAL TUTORIAL TO INSTALL R 3.6 ON LINUX MINT 19.1

Sorry if my English isn't good enough, I'm from Argentina.
This are the steps:

Remove old R (if you have)
The best way to do this is through the interface. Not using the terminal.
I have it in spanish, logically, but you can find it like a "software origin manager" or something. (Menu>Administration>...)
Relax, not big deal.
Captura de pantalla -2019-05-27 16-57-53.png
So here you have to delete all the repositories that are related to CRAN.
Could be that you don't have any repositories there. Don't worry, it could be because you had installed R without specifying it.
Then uninstall R with these commands:

Code: Select all

sudo apt purge r-base* r-recommended r-cran-*
sudo apt autoremove
sudo apt update
Install R 3.6
Put these on the terminal:

Code: Select all

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9
sudo add-apt-repository https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
The second command will work, but we have to make something else.
Linux Mint has a problem with this command to add repositories. That's why I spend all day trying to install R.
And I tried too adding it through the interface but does not work.
The repository is loaded, but we have to edit it in the interface I mentioned above.
Once we entered to the ""software origin manager" or something", select the repository of CRAN and click edit.
You will notice that at the end of the URL, it's wrong written.
It says bionic main instead of bionic-cran35/.
Correct it.
Then put these on the terminal:

Code: Select all

sudo apt update
sudo apt install r-base
That's all folks. Hope it work for you. :)

gm10
Level 18
Level 18
Posts: 8753
Joined: Thu Jun 21, 2018 5:11 pm

Re: R 3.6 for Linux Mint 19.1

Post by gm10 » Mon May 27, 2019 6:12 pm

erzebet wrote:
Mon May 27, 2019 4:46 pm

Code: Select all

sudo add-apt-repository https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
Linux Mint has a problem with this command to add repositories.
To explain what is happening here, the issue is that your command line is incomplete, so the tool enables a mode trying to guess the missing parts for you.

Correctly written the command must be like this, then your repository gets added just like you want it without modifications:

Code: Select all

sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
In other words, it's indeed not a bug, but a (slightly obscure) feature.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

erzebet
Level 1
Level 1
Posts: 3
Joined: Mon May 27, 2019 3:25 pm

Re: R 3.6 for Linux Mint 19.1

Post by erzebet » Tue May 28, 2019 4:51 pm

Yes, that's the command that is supposed to work, but it doesn't.
It says that is wrong. So I tried that way and it worked for me.
That's why I made this post.

erzebet
Level 1
Level 1
Posts: 3
Joined: Mon May 27, 2019 3:25 pm

Re: R 3.6 for Linux Mint 19.1

Post by erzebet » Tue May 28, 2019 4:55 pm

Here's the output:

>> eliana@Banana:~$ sudo add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/'
>> [sudo] contraseña para eliana:
>> Entrada mal formada, repositorio no agregado.
>> eliana@Banana:~$

gm10
Level 18
Level 18
Posts: 8753
Joined: Thu Jun 21, 2018 5:11 pm

Re: R 3.6 for Linux Mint 19.1

Post by gm10 » Tue May 28, 2019 5:08 pm

Ah, I had forgotten about that bug, I had a fix submitted before 19.1 even released but unfortunately the fix didn't get included and Clem didn't consider it critical enough to release the fix for 19.1 at all unfortunately...

It works correctly with my version of the command from my PPA, but of course that doesn't help you on regular LM 19.1.
Tune up your LM 19.x: ppa:gm10/linuxmint-tools

KingLouie
Level 1
Level 1
Posts: 1
Joined: Thu Jun 27, 2019 8:05 am

Re: R 3.6 for Linux Mint 19.1

Post by KingLouie » Thu Jun 27, 2019 8:09 am

I only register to say : THANK YOU!!!!! I took me just a half day to find your post and not a whole day - but now it works. So again: thank you!!!

venik212
Level 1
Level 1
Posts: 44
Joined: Thu Aug 25, 2011 12:05 pm

Re: R 3.6 for Linux Mint 19.1

Post by venik212 » Mon Jul 22, 2019 12:35 pm

THANK YOU erzebet for showing us how to install R 3.6 -- I spent two days (I always suspect myself before I blame others) in trying to get around this "non-critical" bug. With your post I was finally able t do it.

Post Reply

Return to “Tutorials”