0

I recently attempted a do-release-upgrade, which unfortunately was interrupted during the process (it is a remote machine, that I can only access through ssh), and I now encounter many broken dependencies that I'm unable to fix. Also I'm unable to install other packages (for example apache2) because of those unmet dependencies. (Short) history of the system:

  • At some point in the past there was an Ubuntu 13.04 (raring) on it
  • Later I installed Ubuntu 13.10 (saucy).
  • I think that at some point, there were mixed sources (raring and saucy) in sources.list, but I do not remember the reason.
  • There were also third-party sources (in particular because I wanted to, and did, install virtualmin)

Now:

  • I wanted to upgrade this system to the newest LTS release. I decided to do this in several steps (13.10 -> 14.04 and then LTS release upgrade 14.04-> 16.04). For this, I removed all third-party sources (actually only virtualmin I think), and replaced "raring/saucy" by "trusty" (14.04) and did apt update and dist-upgrade. I think it worked, but I did not play long with this system.
  • Then I did edited /etc/update-manager/release-upgrades and set Prompt=lts in order to allow a release-upgrade to the next LTS version "Xenial" (16.04) instead of 14.10. Then I performed do-release-upgrade.
  • Unfortunately I lost the Internet connection to the machine (this is a remote machine) during the process and the installation did not go to the end (although I believe it was almost the end)

And here I am: aptitude update shows some problems that I do not understand:

root@digi00261:/var/log# aptitude update
Hit http://archive.ubuntu.com xenial InRelease
Hit http://archive.ubuntu.com xenial-security InRelease
Hit http://archive.ubuntu.com xenial-updates InRelease                       
Hit http://archive.ubuntu.com xenial-backports InRelease                     
Hit http://archive.ubuntu.com xenial/main Sources
Hit http://archive.ubuntu.com xenial/restricted Sources
Hit http://archive.ubuntu.com xenial/universe Sources
Hit http://archive.ubuntu.com xenial/multiverse Sources                                         
Hit http://archive.ubuntu.com xenial/restricted amd64 Packages          
Hit http://archive.ubuntu.com xenial/universe amd64 Packages                                    
Hit http://archive.ubuntu.com xenial/multiverse amd64 Packages          
Hit http://archive.ubuntu.com xenial/restricted i386 Packages           
Hit http://archive.ubuntu.com xenial/universe i386 Packages             

.... I'm cutting here because too many lines. 
     But the y all refer to "xenial" ....

Hit http://archive.ubuntu.com xenial-backports/universe i386 Packages                                                                           
Hit http://archive.ubuntu.com xenial-backports/multiverse i386 Packages                                                                         
Hit http://archive.ubuntu.com xenial-backports/main Translation-en                                                                              
Hit http://archive.ubuntu.com xenial-backports/multiverse Translation-en                                                                        
Hit http://archive.ubuntu.com xenial-backports/restricted Translation-en                                                                        
Hit http://archive.ubuntu.com xenial-backports/universe Translation-en                                                                          
W: Unknown Multi-Arch type 'no' for package 'kwin'                                                                                  17.6 MB/s 0s
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package php-psr-http-message-implementation
W: Ignoring Provides line with DepCompareOp for package php-psr-log-implementation
W: Ignoring Provides line with DepCompareOp for package php-seclib
W: Ignoring Provides line with DepCompareOp for package php-sabre-http
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Ignoring Provides line with DepCompareOp for package xserver-xorg
W: Ignoring Provides line with DepCompareOp for package php-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Ignoring Provides line with DepCompareOp for package xserver-xorg
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems

But the way the above output seems to confirm that there are no mixed sources, since only "xenial" appear. In my sources.list there are only xenial lines.

Attempt to upgrade does not want to do anything:

root@digi00261:/var/log# aptitude upgrade
Resolving dependencies...                
open: 97; closed: 113; defer: 22; conflict: 43
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 103 not upgraded.

Attempt to full-upgrade shows however many broken dependencies:

root@digi00261:/var/log# aptitude full-upgrade
The following NEW packages will be installed:
  distro-info-data{a} initramfs-tools-core{a} libapt-inst2.0{a} libapt-pkg5.0{ab} libbytes-random-secure-perl{a} 
  libcrypt-random-seed-perl{a} libfdisk1{a} libgcrypt20{ab} libgnutls30{ab} libhogweed4{ab} libjs-excanvas{a} libmath-random-isaac-perl{a} 
  libmath-random-isaac-xs-perl{a} libmemcached11{a} libmemcachedutil2{a} libmspack0{a} libnettle6{a} libperl5.22{a} libplymouth4{a} 
  libprocps4{a} librtmp1{a} libruby2.3{ab} libsystemd0{a} lynx-common{a} netfilter-persistent{a} perl-modules-5.22{ab} 
  python-cryptography{ab} ruby2.3{ab} ruby2.3-doc{a} xdg-user-dirs{a} 
The following packages will be upgraded:
  apt apt-transport-https apt-utils bash{b} bsdutils dovecot-core{b} dovecot-imapd{b} dovecot-pop3d dpkg{b} gcc-4.9-base ifupdown 
  init-system-helpers{b} initramfs-tools{b} initramfs-tools-bin iproute2{b} iptables-persistent joe{b} kmod lame{b} landscape-common{b} 
  less{b} libaccountsservice0 libapparmor-perl libavahi-client3 libclamav7{b} libcrypt-ssleay-perl libcups2 libcurl3 libcurl3-gnutls 
  libdbus-1-3 libgd3{b} libglib2.0-0 libgnutls-openssl27 libgssapi-krb5-2 libk5crypto3 libkrb5-3{b} libkrb5support0 libldap-2.4-2 
  libpg-perl libpolkit-gobject-1-0 libpulse0 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib{b} 
  libschroedinger-1.0-0{b} libudev1 libwhoopsie0 libxml-libxml-perl lsb-base lsb-release{b} lynx{b} lynx-cur mercurial mercurial-common 
  mtr-tiny{b} nano{b} ntfs-3g ntp{b} openssh-client openssh-server openssh-sftp-server passwd perl perl-base{b} plymouth ppp procps{b} 
  proftpd-basic{b} psmisc{b} python python-apt python-crypto python-debian{b} python-launchpadlib python-lazr.restfulclient python-minimal 
  python-openssl{b} python-requests python-twisted-core{b} python-urllib3 python2.7 python2.7-minimal python3-apt{b} 
  python3-commandnotfound{b} python3-distupgrade{b} python3-update-manager{b} resolvconf{b} ri sasl2-bin ssh tcpdump{b} 
  ubuntu-release-upgrader-core udev unattended-upgrades{b} update-manager-core update-notifier-common{b} upstart{b} util-linux{b} 
  uuid-runtime w3m{b} whoopsie{b} wpasupplicant 
The following packages are RECOMMENDED but will NOT be installed:
  dbus dbus:i386 libglib2.0-data mythbuntu-default-settings plymouth-theme-hamara plymouth-theme-kubuntu-logo plymouth-theme-kubuntu-text 
  plymouth-theme-lubuntu-logo plymouth-theme-lubuntu-text plymouth-theme-sabily plymouth-theme-sabily-text plymouth-theme-ubuntu-gnome-logo 
  plymouth-theme-ubuntu-gnome-text plymouth-theme-ubuntu-logo plymouth-theme-ubuntu-mate-logo plymouth-theme-ubuntu-mate-text 
  plymouth-theme-ubuntu-text plymouth-theme-ubuntustudio plymouth-theme-xubuntu-logo plymouth-theme-xubuntu-text plymouth-themes 
103 packages upgraded, 30 newly installed, 0 to remove and 0 not upgraded.
Need to get 47.4 MB/51.0 MB of archives. After unpacking 88.3 MB will be used.
The following packages have unmet dependencies:
 nano : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
        Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 libclamav7 : Depends: libllvm3.6v5 which is a virtual package.
              Depends: libltdl7 (>= 2.4.6) but 2.4.2-1.2ubuntu1 is installed.
 libpython2.7-stdlib : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
                       Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 resolvconf : Breaks: sysv-rc (< 2.88dsf-42) but 2.88dsf-41ubuntu6.3 is installed.
              Breaks: sysv-rc:i386 (< 2.88dsf-42) which is a virtual package.
 perl-base : Breaks: perl-modules (< 5.22.1~) but 5.18.2-2ubuntu1.7 is installed.
 procps : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
          Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
          Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 tcpdump : Depends: libpcap0.8 (>= 1.5.1) but 1.3.0-1 is installed.
 dpkg : PreDepends: libselinux1 (>= 2.3) but 2.2.2-1ubuntu0.1 is installed.
        Breaks: install-info (< 5.1.dfsg.1-3~) but 4.13a.dfsg.1-10ubuntu4 is installed.
        Breaks: install-info:i386 (< 5.1.dfsg.1-3~) which is a virtual package.
        Breaks: man-db (< 2.6.3-6~) but 2.6.3-3 is installed.
        Breaks: man-db:i386 (< 2.6.3-6~) which is a virtual package.
 whoopsie : PreDepends: sysvinit-utils (>= 2.88dsf-50) but 2.88dsf-41ubuntu6.3 is installed.
 joe : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 libkrb5-3 : Depends: libkeyutils1 (>= 1.5.9) but 1.5.5-4 is installed.
 lame : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 iproute2 : Depends: libmnl0 (>= 1.0.3-4~) which is a virtual package.
 python3-update-manager : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
 libapt-pkg5.0 : Depends: liblz4-1 (>= 0.0~r127) which is a virtual package.
 libgcc1 : Depends: gcc-4.9-base (= 4.9.3-0ubuntu4) but 4.9.3-13ubuntu2 is to be installed.
 perl-modules-5.22 : Conflicts: perl-modules but 5.18.2-2ubuntu1.7 is installed.
 python3-commandnotfound : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
 psmisc : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 ruby2.3 : Depends: rubygems-integration (>= 1.8) which is a virtual package.
 python-cryptography : Depends: python-cffi-backend-api-9729 which is a virtual package.
                       Depends: python-enum34 which is a virtual package.
                       Depends: python-idna which is a virtual package.
                       Depends: python-ipaddress which is a virtual package.
                       Depends: python-pyasn1 (>= 0.1.8) which is a virtual package.
                       Depends: python-six (>= 1.4.1) but 1.2.0-1 is installed.
 libschroedinger-1.0-0 : Depends: liborc-0.4-0 (>= 1:0.4.20) but 1:0.4.17-1 is installed.
 update-notifier-common : Depends: python3-dbus which is a virtual package.
                          Depends: python3-debian which is a virtual package.
 libruby2.3 : Depends: rake (>= 10.4.2) which is a virtual package.
              Depends: ruby-did-you-mean (>= 1.0) which is a virtual package.
              Depends: ruby-minitest (>= 5.4) which is a virtual package.
              Depends: ruby-net-telnet (>= 0.1.1) which is a virtual package.
              Depends: ruby-test-unit (>= 3.0.8~) which is a virtual package.
 libgd3 : Depends: libvpx3 (>= 1.5.0) which is a virtual package.
 initramfs-tools : Breaks: initscripts (< 2.88dsf-59.3~) but 2.88dsf-41ubuntu6.3 is installed.
                   Breaks: initscripts:i386 (< 2.88dsf-59.3~) which is a virtual package.
 w3m : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 python-debian : Depends: python-six (> 1.4~) but 1.2.0-1 is installed.
 lynx : Depends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
        Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 ntp : Depends: libopts25 (>= 1:5.18.7) but 1:5.17.1-1ubuntu2 is installed.
 bash : PreDepends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 proftpd-basic : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
                 Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 lsb-release : Depends: python3:any (>= 3.4~) which is a virtual package.
 dovecot-core : Depends: libexttextcat-2.0-0 (>= 3.3.0) which is a virtual package.
                Depends: liblz4-1 (>= 0.0~r113) which is a virtual package.
 less : Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 python3-apt : Depends: python3 (>= 3.5~) but 3.3.1-0ubuntu1 is installed.
 libhogweed4 : Depends: libgmp10 (>= 2:6.0.0) but 2:5.0.5+dfsg-2ubuntu3 is installed.
 mtr-tiny : Depends: libncurses5 (>= 6) but 5.9-10ubuntu4 is installed.
            Depends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 upstart : Depends: libcgmanager0 (>= 0.28) but 0.24-0ubuntu7.5 is installed.
 python-openssl : Depends: python-six (>= 1.5.2) but 1.2.0-1 is installed.
 python-twisted-core : Depends: python-service-identity which is a virtual package.
 libgnutls30 : Depends: libgmp10 (>= 2:6) but 2:5.0.5+dfsg-2ubuntu3 is installed.
 python3-distupgrade : Depends: python3:any (>= 3.3.2-2~) which is a virtual package.
 landscape-common : Depends: python-configobj which is a virtual package.
 init-system-helpers : Breaks: sysvinit-utils (< 2.88dsf-59.3~) but 2.88dsf-41ubuntu6.3 is installed.
                       Breaks: sysvinit-utils:i386 (< 2.88dsf-59.3~) which is a virtual package.
 dovecot-imapd : Depends: liblz4-1 (>= 0.0~r113) which is a virtual package.
 util-linux : Depends: sysvinit-utils (>= 2.88dsf-59.1~) but 2.88dsf-41ubuntu6.3 is installed.
              PreDepends: libncursesw5 (>= 6) but 5.9-10ubuntu4 is installed.
              PreDepends: libtinfo5 (>= 6) but 5.9-10ubuntu4 is installed.
 unattended-upgrades : Depends: python3-gi but it is not installable.
                       Depends: python3-dbus which is a virtual package.
 libgcrypt20 : Depends: libgpg-error0 (>= 1.14) but 1.10-3.1ubuntu1 is installed.
open: 148; closed: 285; defer: 53; conflict: 87

Unfortunately aptitude is not able to find any solution to fix these dependencies. The proposed solution amount to "Keep the following packages at their current version" for all the packages.

Any help will be welcome...

EDIT1:

Output of apt-get install apt apt-transport-https apt-utils:

root@digi00261:/var/log# apt-get install apt apt-transport-https apt-utils
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:
 apt : Depends: libapt-pkg5.0 (>= 1.2.32) but it is not going to be installed
       Depends: init-system-helpers (>= 1.18~) but 1.14ubuntu1 is to be installed
 apt-transport-https : Depends: libapt-pkg5.0 (>= 1.1~exp15) but it is not going to be installed
 apt-utils : Depends: libapt-inst2.0 (>= 1.0.5) but it is not going to be installed
             Depends: libapt-pkg5.0 (>= 1.1~exp15) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

EDIT2 Here is the source of the problem: my sources.list:

###### Ubuntu Main Repos
deb http://archive.ubuntu.com/ubuntu/ xenial restricted universe multiverse 
deb-src http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 

###### Ubuntu Update Repos
deb http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 
deb-src http://archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
deb-src http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
deb-src http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 

deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-xenial main
deb http://software.virtualmin.com/vm/6/gpl/apt virtualmin-universal main

The repos were missing the "main" !! This is the reason why there were some many broken dependencies in the form "package_xxx needs package_yyy version a.a.a but version b.b.b is installed". The needed newes versions could not be installed because of the missing "main" repo.

  • What does apt-get install apt apt-transport-https apt-utils say? (Not aptitude, apt-get.) – Stephen Kitt Sep 19 '19 at 7:29
  • sometimes using apt-get install XXX where XXX is one of the packages listed to be upgraded such as apt or bash can help things get unstuck. In other words encourage it to take baby steps rather than eat the whole elephant at once. – icarus Sep 19 '19 at 7:55
  • I agree completely with the idea to take baby steps... I just do not know which ones ! – nico roy Sep 19 '19 at 8:14
0

I finally found the reason: The repos were missing the "main" !! See Edit 2

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.