I recently tried a dist-upgrade from 16.04 to 18.04. During the upgrade process, it reported problems with broken dependencies. I noted the packages, hoping I could fix the problem later.
Now I seem to be stuck in a place where I can't to either install, fix or uninstall packages.
First, my repositories:
ralmond@Limu:~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64
(20120425)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04 LTS _Precise Pangolin_ - Release amd64 (20120425)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates main restricted
deb-src http://us.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://us.archive.ubuntu.com/ubuntu/ bionic universe
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic universe
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates universe
deb-src http://us.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://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic multiverse
deb http://us.archive.ubuntu.com/ubuntu/ bionic-updates multiverse
deb-src http://us.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://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse
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
## 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 precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
# deb http://lib.stat.cmu.edu/R/CRAN/bin/linux/ubuntu trusty/ # disabled on upgrade to trusty disabled on upgrade to xenial
# deb https://mirrors.nics.utk.edu/cran/linux/ubuntu xenial main
# deb-src https://mirrors.nics.utk.edu/cran/linux/ubuntu xenial main
# deb http://cran.rstudio.com/bin/linux/ubuntu xenial/ # disabled on upgrade to bionic
I manually commented out the precise partner repo as that was possibly a problem. All other older repos in sources.list and sources.list.d were commented out.
I try to run apt-get -f install to fix the broken dependencies, but I get
ralmond@Limu:~$ sudo apt-get -f install
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is installed
libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
Depends: perlapi-5.26.0
libnet-ssleay-perl : Depends: perl (>= 5.26.1-4build1) but 5.22.1-9ubuntu0.5 is installed
Depends: perlapi-5.26.1
libxml-libxml-perl : Depends: perl (>= 5.26.1-2ubuntu1) but 5.22.1-9ubuntu0.5 is installed
Depends: perlapi-5.26.1
libxml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is installed
Depends: perlapi-5.26.0
systemd : Depends: libsystemd0 (= 229-4ubuntu21.2) but 237-3ubuntu10 is installed
texlive-binaries : Depends: libharfbuzz0b (>= 1.4.1) but 1.0.1-1ubuntu0.1 is installed
Depends: libmpfr6 (>= 3.1.3) but it is not installed
Depends: libpoppler73 (>= 0.62.0) but it is not installed
texlive-extra-utils : Depends: libunicode-linebreak-perl but it is not installed
texlive-generic-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
texlive-generic-recommended : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
texlive-lang-chinese : Depends: fonts-arphic-bkai00mp but it is not installed
Depends: fonts-arphic-bsmi00lp but it is not installed
Depends: fonts-arphic-gbsn00lp but it is not installed
Depends: fonts-arphic-gkai00mp but it is not installed
texlive-lang-korean : Depends: fonts-baekmuk but it is not installed
Depends: fonts-unfonts-extra but it is not installed
texlive-lang-other : Depends: fonts-sil-padauk (>= 3.003-1) but 2.80-2 is installed
texlive-plain-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
texlive-pstricks : Depends: texlive-plain-generic (>= 2017.20170628) but it is not installed
texlive-science : Depends: texlive-lang-greek (>= 2017.20170628) but it is not installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
There are no held packages:
ralmond@Limu:~$ sudo apt-mark showhold
ralmond@Limu:~$
If I try a dist-upgrade again, I get very similar error messages:
ralmond@Limu:~$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is installed
... [Removing nearly identical list of broken packages.]
E: Unmet dependencies. Try using -f.
The -f option doesn't seem to help.
ralmond@Limu:~$ sudo apt-get -f dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Correcting dependencies... failed.
The following packages have unmet dependencies:
debhelper : Depends: dh-autoreconf (>= 17~) but it is not installed
Depends: dh-strip-nondeterminism (>= 0.028~) but 0.015-1 is installed
...
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies
Removing a package has similar issues:
ralmond@Limu:~$ sudo apt-get -f remove debhelper
Reading package lists... Done
Building dependency tree
Reading state information... Done
You might want to run 'apt-get -f install' to correct these:
The following packages have unmet dependencies:
alien : Depends: debhelper (>= 7) but it is not going to be installed
dh-strip-nondeterminism : Depends: debhelper but it is not going to be installed
dh-translations : Depends: debhelper but it is not going to be installed
libglib2.0-bin : Depends: libglib2.0-0 (= 2.56.1-2ubuntu1) but 2.48.2-0ubuntu1 is to be installed
libhtml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
Depends: perlapi-5.26.0
libnet-ssleay-perl : Depends: perl (>= 5.26.1-4build1) but 5.22.1-9ubuntu0.5 is to be installed
Depends: perlapi-5.26.1
libxml-libxml-perl : Depends: perl (>= 5.26.1-2ubuntu1) but 5.22.1-9ubuntu0.5 is to be installed
Depends: perlapi-5.26.1
libxml-parser-perl : Depends: perl (>= 5.26.0-4) but 5.22.1-9ubuntu0.5 is to be installed
Depends: perlapi-5.26.0
systemd : Depends: libsystemd0 (= 229-4ubuntu21.2) but 237-3ubuntu10 is to be installed
texlive-binaries : Depends: libharfbuzz0b (>= 1.4.1) but 1.0.1-1ubuntu0.1 is to be installed
Depends: libmpfr6 (>= 3.1.3) but it is not going to be installed
Depends: libpoppler73 (>= 0.62.0) but it is not going to be installed
texlive-extra-utils : Depends: libunicode-linebreak-perl but it is not going to be installed
texlive-generic-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
texlive-generic-recommended : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
texlive-lang-chinese : Depends: fonts-arphic-bkai00mp but it is not going to be installed
Depends: fonts-arphic-bsmi00lp but it is not going to be installed
Depends: fonts-arphic-gbsn00lp but it is not going to be installed
Depends: fonts-arphic-gkai00mp but it is not going to be installed
texlive-lang-korean : Depends: fonts-baekmuk but it is not going to be installed
Depends: fonts-unfonts-extra but it is not going to be installed
texlive-lang-other : Depends: fonts-sil-padauk (>= 3.003-1) but 2.80-2 is to be installed
texlive-plain-extra : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
texlive-pstricks : Depends: texlive-plain-generic (>= 2017.20170628) but it is not going to be installed
texlive-science : Depends: texlive-lang-greek (>= 2017.20170628) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).
It really looks like somehow debhelper is broken. I'm afraid to get too aggressive about removing it for fear that I will break the entire debian system and not be able to move forwards or backwards.
Thanks in advance for any help or suggestions about what to try next.
Update 1: Following this link (Unmet dependencies error). It suggested trying dpkg --purge --pending
. This did not solve my problem, but I think it provided a clue. Here is the output:
ralmond@Limu:~$ sudo dpkg --purge --pending
[sudo] password for ralmond:
dpkg: dependency problems prevent removal of texlive:
mathtex depends on texlive.
dpkg: error processing package texlive (--purge):
dependency problems - not removing
(Reading database ... 545797 files and directories currently installed.)
Removing systemd-shim (9-1bzr4ubuntu1) ...
Removing 'diversion of /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service to /usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd by systemd-shim'
dpkg-divert: error: rename involves overwriting '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service' with
different file '/usr/share/dbus-1/system-services/org.freedesktop.systemd1.service.systemd', not allowed
dpkg: error processing package systemd-shim (--purge):
installed systemd-shim package post-removal script subprocess
returned error exit status 2
Errors were encountered while processing:
texlive
systemd-shim
dist-upgrade
? Or did you do an Ubuntu-styledo-release-upgrade
? They are different, the wrong one may break your Ubuntu system. – user535733 Jul 07 '18 at 03:11do-release-upgrade
. It might save your system, it might not. Ubuntu is based closely upon Debian, but there are important differences. – user535733 Jul 07 '18 at 03:26do-release-upgrade
to 18.04 isn't visible to 16.04, until after 18.04.1 is released; so 'no release found' is still correct. That path isn't expected to be opened until a few days after 26-July-2018. The -d may get you to 18.04 now if you don't want to wait (but be careful you don't jump to 18.10) – guiverc Jul 07 '18 at 04:46/etc/apt/sources.list/*.list
files? Did you trysudo aptitude safe-upgrade
? – N0rbert Jul 07 '18 at 10:41