未能将 Jessie 升级为 Stretch

未能将 Jessie 升级为 Stretch

我在尝试完成时遇到了包问题。看来 gnupg 和 python-apt 正在阻止 dist 升级过程完成。

我的源文件是:

deb http://ftp.ca.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.ca.debian.org/debian/ stretch main contrib non-free

deb http://security.debian.org/debian-security  stretch/updates main contrib non-free
deb-src http://security.debian.org/debian-security  stretch/updates main contrib non-free

我们看到的错误是:

apt-get dist-upgrade

The following packages have unmet dependencies:
 gnupg : Breaks: python-apt (<= 1.1.0~beta4) but 0.9.3.13 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

apt-get install gnupg

gnupg : Breaks: python-apt (<= 1.1.0~beta4) but 0.9.3.13 is to be installed

apt-get install python-apt

dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.4.11 is to be installed

系统已经升级了,但是一堆包被扣了。我认为是由于这些软件包。

有人有建议吗?

- 更新 -

我将范围缩小到 python-apt

 apt policy apt dpkg python-apt
apt:
  Installed: 2.1.10
  Candidate: 2.1.10
  Version table:
 *** 2.1.10 100
        100 /var/lib/dpkg/status
     1.4.11 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     1.4.10 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
dpkg:
  Installed: 1.20.5
  Candidate: 1.20.5
  Version table:
 *** 1.20.5 100
        100 /var/lib/dpkg/status
     1.18.25 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
python-apt:
  Installed: 0.9.3.13
  Candidate: 1.4.3
  Version table:
     1.4.3 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     1.4.1 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
 *** 0.9.3.13 100
        100 /var/lib/dpkg/status

----
apt policy apt dpkg gnupg

apt:
  Installed: 2.1.10
  Candidate: 2.1.10
  Version table:
 *** 2.1.10 100
        100 /var/lib/dpkg/status
     1.4.11 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
     1.4.10 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
dpkg:
  Installed: 1.20.5
  Candidate: 1.20.5
  Version table:
 *** 1.20.5 100
        100 /var/lib/dpkg/status
     1.18.25 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
gnupg:
  Installed: (none)
  Candidate: 2.1.18-8~deb9u4
  Version table:
     2.1.18-8~deb9u4 500
        500 http://ftp.debian.org/debian stretch/main amd64 Packages
     2.1.18-8~deb9u2 500
        500 http://security.debian.org/debian-security stretch/updates/main amd64 Packages

--- 更新了对 python-apt 的研究

 apt-get install  python-apt

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:
 libapt-inst2.0 : Depends: libapt-pkg5.0 (>= 1.1~exp9) but it is not installable
 python-apt : Depends: libapt-pkg5.0 (>= 1.4~beta3) but it is not installable
E: Unable to correct problems, you have held broken packages.


apt-get install  libapt-pkg5.0

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:
 cron : Depends: libpam0g (>= 0.99.7.1) but it is not going to be installed
        Depends: adduser but it is not going to be installed
        Depends: libpam-runtime (>= 1.0.1-11) but it is not going to be installed
        Recommends: default-mta or
                    mail-transport-agent
 dpkg : Breaks: libapt-pkg5.0 (< 1.7~b) but 1.4.11 is to be installed
 fontconfig : Depends: fontconfig-config but it is not going to be installed
 init-system-helpers : Depends: perl-base (>= 5.20.1-3) but it is not going to be installed
 libfontconfig1 : Depends: fontconfig-config (>= 2.11.0-6.7) but it is not going to be installed
 libgssapi-krb5-2 : Depends: libkrb5-3 (= 1.17-10) but it is not going to be installed
 librsvg2-common : Depends: librsvg2-2 (= 2.40.21-0+deb9u1) but it is not going to be installed
 libssl1.0.2 : Depends: debconf (>= 0.5) but it is not going to be installed or
                        debconf-2.0
 libuuid1 : Depends: passwd but it is not going to be installed
            Recommends: uuid-runtime but it is not going to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

答案1

最终完全删除了 python-apt 和 gnupg 软件包。

相关内容