我最近尝试了 do-release-upgrade,不幸的是在这个过程中被中断了(它是一台远程机器,我只能通过 ssh 访问),现在我遇到了许多无法修复的损坏的依赖项。此外,由于这些未满足的依赖关系,我无法安装其他软件包(例如 apache2)。 (简短)系统历史:
- 在过去的某个时候,上面有一个 Ubuntu 13.04(raring)
- 后来我安装了 Ubuntu 13.10(俏皮)。
- 我认为在某些时候,sources.list 中存在混合来源(稀有和俏皮),但我不记得原因。
- 还有第三方来源(特别是因为我想并且确实安装了 virtualmin)
现在:
- 我想将此系统升级到最新的 LTS 版本。我决定分几个步骤执行此操作(13.10 -> 14.04,然后 LTS 版本升级 14.04-> 16.04)。为此,我删除了所有第三方源(实际上我认为只有 virtualmin),并将“raring/saucy”替换为“trusty”(14.04),并执行了
apt update
和dist-upgrade
。我认为它有效,但我没有使用这个系统很长时间。 - 然后我进行了编辑
/etc/update-manager/release-upgrades
和设置Prompt=lts
,以便允许发布升级到下一个 LTS 版本“Xenial”(16.04)而不是 14.10。然后我表演了do-release-upgrade
。 - 不幸的是,在这个过程中我失去了与机器(这是一台远程机器)的互联网连接,安装并没有结束(尽管我相信这已经快结束了)
我在这里:
aptitude update
展示了一些我不明白的问题:
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
但上述输出的方式似乎确认不存在混合源,因为只出现“xenial”。在我的sources.list 中只有xenial 行。
尝试upgrade
不想做任何事:
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.
尝试full-upgrade
显示许多损坏的依赖关系:
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
不幸的是 aptitude 无法找到任何解决方案来修复这些依赖项。对于所有软件包,建议的解决方案相当于“将以下软件包保留为其当前版本”。
欢迎任何帮助...
编辑1:
输出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.
编辑2 这是问题的根源:我的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
回购缺少“主要”!这就是为什么存在“package_xxx 需要 package_yyy 版本 aaa 但版本 bbb 已安装”形式的许多损坏依赖项的原因。由于缺少“主”存储库,无法安装所需的新版本。
答案1
我终于找到了原因:回购缺少“主要”!看编辑2