0

I am trying to install R on Ubuntu. I'm relatively new and inexperienced so may have made a stupid mistake. I am running Ubuntu 19.04

I am installing R using apt: sudo apt-get install r-base

When I run this I get this error:

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 (>= 3.6.3-1bionic) but it is not going to be installed
          Depends: r-recommended (= 3.6.3-1bionic) 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 looked at this question: How do I resolve unmet dependencies after adding a PPA? for assistance.

I have run

  • sudo apt-get update
  • sudo apt-get upgrade (0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.)

These run with no issues.

I have then run sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade

This responded with:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Starting pkgProblemResolver with broken count: 1
Starting 2 pkgProblemResolver with broken count: 1
Investigating (0) wine-stable:amd64 < 3.0.1ubuntu1 -> 5.0.0~disco @ii umU Ib >
Broken wine-stable:amd64 Depends on wine-stable-i386:amd64 < none @un H > (= 5.0.0~disco)
  Considering wine-stable-i386:i386 0 as a solution to wine-stable:amd64 0
  Holding Back wine-stable:amd64 rather than change wine-stable-i386:amd64
 Try to Re-Instate (1) wine-stable:amd64
Done
Calculating upgrade... Done
The following packages have been kept back:
  wine-stable
0 to upgrade, 0 to newly install, 0 to remove and 1 not to upgrade.

I therefore removed and reinstalled wine-stable. When rerunning debug I no packages showed.

I believe my issue may be due to something in my PPA. I disabled a couple of these.

The output of cat /etc/apt/sources.list is:

# deb cdrom:[Ubuntu 19.04 _Disco Dingo_ - Release amd64 (20190416)]/ disco main restricted

See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to

newer versions of the distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ disco main restricted

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco main restricted

Major bug fix updates produced after the final release of the

distribution.

deb http://gb.archive.ubuntu.com/ubuntu/ disco-updates main restricted

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco-updates main restricted

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team. Also, please note that software in universe WILL NOT receive any

review or updates from the Ubuntu security team.

deb http://gb.archive.ubuntu.com/ubuntu/ disco universe

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco universe

deb http://gb.archive.ubuntu.com/ubuntu/ disco-updates universe

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco-updates universe

N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu

team, and may not be under a free licence. Please satisfy yourself as to

your rights to use the software. Also, please note that software in

multiverse WILL NOT receive any review or updates from the Ubuntu

security team.

deb http://gb.archive.ubuntu.com/ubuntu/ disco multiverse

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco multiverse

deb http://gb.archive.ubuntu.com/ubuntu/ disco-updates multiverse

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco-updates multiverse

N.B. software from this repository may not have been tested as

extensively as that contained in the main release, although it includes

newer versions of some applications which may provide useful features.

Also, please note that software in backports WILL NOT receive any review

or updates from the Ubuntu security team.

deb http://gb.archive.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse

deb-src http://gb.archive.ubuntu.com/ubuntu/ disco-backports main restricted universe multiverse

Uncomment the following two lines to add software from Canonical's

'partner' repository.

This software is not part of Ubuntu, but is offered by Canonical and the

respective vendors as a service to Ubuntu users.

deb http://archive.canonical.com/ubuntu disco partner

deb-src http://archive.canonical.com/ubuntu disco partner

deb http://security.ubuntu.com/ubuntu disco-security main restricted

deb-src http://security.ubuntu.com/ubuntu disco-security main restricted

deb http://security.ubuntu.com/ubuntu disco-security universe

deb-src http://security.ubuntu.com/ubuntu disco-security universe

deb http://security.ubuntu.com/ubuntu disco-security multiverse

deb-src http://security.ubuntu.com/ubuntu disco-security multiverse

This system was installed using small removable media

(e.g. netinst, live or single CD). The matching "deb cdrom"

entries were disabled at the end of the installation process.

For information about how to configure apt package sources,

see the sources.list(5) manual.

deb https://dl.winehq.org/wine-builds/ubuntu/ disco main

deb-src https://dl.winehq.org/wine-builds/ubuntu/ disco main

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

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

deb http://cran.rstudio.com/bin/linux/ubuntu disco/

deb-src http://cran.rstudio.com/bin/linux/ubuntu disco/

the output of cat /etc/apt/sources.list.d/* is:

### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
### THIS FILE IS AUTOMATICALLY CONFIGURED ###
# You may comment out this entry, but any other modifications may be lost.
deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main
# deb http://ppa.launchpad.net/jonathonf/gcc-7.1/ubuntu disco main
# deb http://ppa.launchpad.net/jonathonf/gcc-7.1/ubuntu disco main
deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu disco main
# deb-src http://ppa.launchpad.net/obsproject/obs-studio/ubuntu disco main
deb http://ppa.launchpad.net/obsproject/obs-studio/ubuntu disco main
# deb-src http://ppa.launchpad.net/obsproject/obs-studio/ubuntu disco main

Through Software & Updates -> Other Software, I unticked a couple of items which I may have helped or worsened stuff:

Software & Updates

I hope I have included anything which may be helpful. Let me know if you need more detail.

Kulfy
  • 17,696
Allentro
  • 109
  • You appear to be trying to use the bionic-cran35 repository in disco - I'm not sure that's a good idea – steeldriver Mar 24 '20 at 16:29
  • Aha okay - I can't remember intentionally setting this. Could you assist me with why this is a bad idea and alternatives/rectifications, please? – Allentro Mar 24 '20 at 16:31

1 Answers1

0

This is a simple fix. bionic-cran35 is trying to run as it is present in the source.list. This is from a previous botched attempt at installing. Commenting out the

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

line in the code has fixed this ptoblem.

Bionic is from previous Ubuntu distributions and has been replaced by Disco in 19.04.

Thank you to @steeldriver for pointing out my flaw.

Allentro
  • 109