Choose style:

Author Topic: Unable to Fix Broken Packages When Installing R-Base (SOLVED)  (Read 113 times)

0 Members and 1 Guest are viewing this topic.

Offline Skyler

  • nOOb
  • *
  • Posts: 3
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Hey everyone :)

I am new to this forum and I just recently switched from using Windows to using Linux (I now dual-boot WIndows 10 and Peppermint 10).
My experience has been great so far but I am facing a huge problem. In my day-to-day work, I heavily rely on R and R Studio.
However, I am unable to install R on my Peppermint 10 system. I have spent more than a day trying to figure this out - unsuccessfully.

Whenever I go to install the r-base package from Synaptic, I receive an error. The package seems to be broken. When I select the "fix all broken packages"-option, I receive this error:
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies


Trying to install related packages like r-base-dev, r-recommended, r-base-core, etc. gives me the same issue.

Installing from terminal also doesn't help. I get this output/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.0-2disco) but it is not going to be installed
          Depends: r-recommended (= 3.6.0-2disco) 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.


Again, trying to install the packages r-base seems to depend on gives me even more errors.

After scouring forums for over a day, I have run countless commands. The most frequently suggested seemed to be:
sudo apt-get update && sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo apt-get autoremove
sudo apt --fix-broken install

They all give me the same output: 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

I have tried listing possible broken packages using    dpkg -l | grep ^..r    but there don't seem to be any broken packages on my system.
Installing R using aptitude doesn't work either.

I have even tried to boot into recovery mode and selected the option: dpkg - Repair Broken Packages
This didn't change anything.

I did have an old version of R installed when I first installed Peppermint 10 and that worked fine. I removed it after a while because I wanted to replace it with the current version. I must have broken something while doing so.

Does anyone have any idea what I may have done wrong or if this problem can be fixed?

Is there maybe a way to reset Peppermint to factory settings? Just for fun, I tried to install R on a fresh Peppermint-VM I set up and it worked without issues, so I think I may have seriously damaged my actual installation somehow  :(

I would truly appreciate your help with this. I am completely new to Linux, so I am unsure how to proceed from here.
Thank you very much :)
Skyler
« Last Edit: July 02, 2019, 11:10:07 am by Skyler »

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25094
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Unable to Fix Broken Packages When Installing R-Base
« Reply #1 on: July 02, 2019, 09:57:13 am »
The version of r-base in the default repos is 3.4.4-1ububntu1 not 3.6.0-2disco

Where did you get r-base_3.6.0-2disco ?

and have you added any PPA's ?

What's the output from:
Code: [Select]
cat /etc/apt/sources.list; for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done
« Last Edit: July 02, 2019, 09:59:20 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Skyler

  • nOOb
  • *
  • Posts: 3
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Unable to Fix Broken Packages When Installing R-Base
« Reply #2 on: July 02, 2019, 10:13:51 am »
I got the newer version of R by following the steps on this website:
https://linuxize.com/post/how-to-install-r-on-ubuntu-18-04/

However, neither version will now install.
I do not believe I have added any PPAs (at least not knowingly - I admit to having googled what that even means).

The output from the command you gave me is this:

Code: [Select]
skyler@skyler-Lenovo-E31-80 ~ $ cat /etc/apt/sources.list; for X in /etc/apt/sources.list.d/*; do echo; echo; echo "** $X:"; echo; cat $X; done
# deb cdrom:[Peppermint 10 (20190514) - Release amd64]/ bionic main multiverse restricted universe

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://de.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic main restricted

## Major bug fix updates produced after the final release of the
## distribution.
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic-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://de.archive.ubuntu.com/ubuntu/ bionic universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic universe
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates universe
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic-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://de.archive.ubuntu.com/ubuntu/ bionic multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://de.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic-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://de.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src http://de.archive.ubuntu.com/ubuntu/ bionic-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 bionic partner
# deb-src http://archive.canonical.com/ubuntu bionic partner

deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/
# deb-src [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/
deb http://cran.wustl.edu/bin/linux/ubuntu bionic-cran35/
deb http://cran.wustl.edu/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/


** /etc/apt/sources.list.d/peppermint.list:

deb http://ppa.launchpad.net/peppermintos/p10-release/ubuntu bionic main
# deb-src http://ppa.launchpad.net/peppermintos/p10-release/ubuntu bionic main


** /etc/apt/sources.list.d/peppermint.list.save:

deb http://ppa.launchpad.net/peppermintos/p10-release/ubuntu bionic main
# deb-src http://ppa.launchpad.net/peppermintos/p10-release/ubuntu bionic main
skyler@skyler-Lenovo-E31-80 ~ $

Thank you very much for taking the time to respond to my post.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25094
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Unable to Fix Broken Packages When Installing R-Base
« Reply #3 on: July 02, 2019, 10:46:38 am »
You seem to have a bunch of added repositories that are probably conflicting.

Run:
Code: [Select]
gksudo xed /etc/apt/sources.list
find the section at the bottom that currently reads
Code: [Select]
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://cloud.r-project.org/bin/linux/ubuntu disco-cran35/
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/
# deb-src [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/
deb http://cran.wustl.edu/bin/linux/ubuntu bionic-cran35/
deb http://cran.wustl.edu/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
and edit that section so it now reads
Code: [Select]
deb http://security.ubuntu.com/ubuntu bionic-security main restricted
# deb-src http://security.ubuntu.com/ubuntu bionic-security main restricted
deb http://security.ubuntu.com/ubuntu bionic-security universe
# deb-src http://security.ubuntu.com/ubuntu bionic-security universe
deb http://security.ubuntu.com/ubuntu bionic-security multiverse
# deb-src http://security.ubuntu.com/ubuntu bionic-security multiverse
deb https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
# deb-src https://cloud.r-project.org/bin/linux/ubuntu bionic-cran35/
SAVE the file and exit the text editor.

Back in the terminal run:
Code: [Select]
sudo apt-get update
now what happens if you run:
Code: [Select]
sudo apt-get install r-base=3.6.0-2bionic r-base-core=3.6.0-2bionic r-base-dev=3.6.0-2bionic r-base-html=3.6.0-2bionic r-cran-boot=1.3-22-1cran1bionic0 r-cran-class=7.3-15-1bionic0 r-cran-cluster=2.1.0-1bionic0 r-cran-codetools=0.2-16-1bionic0 r-cran-foreign=0.8.70-1cranArtful0~ubuntu18.04.1~ppa1 r-cran-kernsmooth=2.23-15-3cranArtful0~ubuntu18.04.1~ppa1 r-cran-lattice=0.20-38-1cran1bionic0 r-cran-mass=7.3-51.1-1bionic0 r-cran-matrix=1.2-17-1bionic0 r-cran-mgcv=1.8-28-1cran1bionic0 r-cran-nlme=3.1.140-1bionic0 r-cran-nnet=7.3-12-2cranArtful0~ubuntu18.04.1~ppa1 r-cran-rpart=4.1-15-1cran1bionic0 r-cran-spatial=7.3-11-2cranArtful0~ubuntu18.04.1~ppa1 r-cran-survival=2.43-3-1cran1bionic0 r-doc-html=3.6.0-2bionic r-recommended=3.6.0-2bionic
« Last Edit: July 02, 2019, 11:41:25 am by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline Skyler

  • nOOb
  • *
  • Posts: 3
  • Karma: 0
  • New Forum User
    • View Profile
  • Peppermint version(s): 10
Re: Unable to Fix Broken Packages When Installing R-Base
« Reply #4 on: July 02, 2019, 11:07:04 am »
Oh my God, it worked!!!  :o

Aha, so by trying to install it over and over again, I seem to have just made the problem worse by adding new repositories...

Thank you so much, I would not have been able to solve this problem myself.
I truly appreciate you taking the time and putting in the effort to help me - thank you very much.

Online PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 25094
  • Karma: 2778
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 8R, 9, and 9R
Re: Unable to Fix Broken Packages When Installing R-Base (SOLVED)
« Reply #5 on: July 02, 2019, 11:38:05 am »
You're most welcome Skyler, glad I could help.

BTW, welcome to the forum :)
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec