[R-sig-Debian] Possible solution to R installation problems for Linux Mint 19 users

Clive Nicholas cliveli@t@ @ending from googlem@il@com
Sun Jul 22 23:36:20 CEST 2018


Hello!

After posting this a version of this on r-help, Bert Gunter kindly
suggested I should also post it here. Apologies for any cross-posting which
may occur. My thanks to Jeff Newmiller and Marc Schwartz for setting me
straight on one or two matters.

If you're a newly-minted (pun _fully_ intended) user of Linux Mint 19
("Tara") and you find you're having issues installing R (as I just have),
please read on as I may have a solution for you.

To set out the context, the problem looks like this:

You (naturally) consult the relevant webpage at cran.r-project.org for your
Linux Mint system (ubuntu) and add the pub key (I've always used Michael
Rutter's). On my last Linux Mint system (18.2), I was using the following
repository entries

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu xenial/
deb-src http://cran.ma.imperial.ac.uk/bin/linux/ubuntu xenial/

which worked fine for me. Unfortunately on my new Linux Mint 19 system:

clive using climate:~$ sudo apt-get update
clive using climate:~$ sudo apt-get upgrade
clive using climate:~$ sudo apt-get install r-base r-base-core r-base-dev
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-core : Depends: libcurl3 (>= 7.28.0) but it is not going to be
installed
               Depends: libpng12-0 (>= 1.2.13-4) but it is not installable
               Depends: libreadline6 (>= 6.0) but it is not installable
E: Unable to correct problems, you have held broken packages.

No matter how many legitimate bash calls I made, such as

sudo dpkg --configure -a # NOT CURRENTLY WORKING PROPERLY AT PRESENT - THE
LINUX TEAM ARE ONTO THIS, APPARENTLY
sudo apt-get -f install
sudo apt-get --fix-broken install r-base r-base-core r-base-dev

nothing worked: I would simply get variations of the same error.

It turns out the solution is to switch away from -xenial- (or -trusty-,
which didn't work for me either) to *-bionic-cran35-* (the default
repository Linux Mint 19), so that now

deb http://cran.ma.imperial.ac.uk/bin/linux/ubuntu bionic-cran35/
deb-src http://cran.ma.imperial.ac.uk/bin/linux/ubuntu bionic-cran35/

(or whichever is your favourite mirror) in your /etc/apt/sources.list.d
file on your Mint system.

Then:

clive using climate:~$ sudo apt-get install r-base r-base-core r-base-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done

[...]

clive using climate:~$ R

R version 3.5.1 (2018-07-02) -- "Feather Spray"
Copyright (C) 2018 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

  Natural language support but running in an English locale

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> plot(rnorm(1000)) # GRAPHIC DULY PRODUCED WITH NO ISSUES!
> q()
Save workspace image? [y/n/c]: n
clive using climate:~$

*Volia!*

So, if you're having the same R installation problems I've just had after
migrating to Linux Mint 19, this should work for you. Good luck. :)

	[[alternative HTML version deleted]]



More information about the R-SIG-Debian mailing list