“apt-get dist-upgrade”显示保留的软件包

“apt-get dist-upgrade”显示保留的软件包

据我所知,保留显示 Debian 中的软件包,以防无法升级软件包,apt-get upgrade因为升级需要安装新软件包。通常可以修复此问题,apt-get dist-upgrade因为如果需要,这将安装新的软件包。

现在,由于某种原因,db5.1-util尽管我执行了以下命令,但包仍被保留apt-get dist-upgrade

root@server:~# apt-get dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
  db5.1-util
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
root@server:~# 

我什至不需要该db5.1-util包,因为它满足我未安装的包(partimage-server和)的依赖关系:db-upgrade-util

root@server:~# apt-cache rdepends db5.1-util
db5.1-util
Reverse Depends:
  partimage-server
  db-upgrade-util
root@server:~# apt-cache policy db5.1-util partimage-server db-upgrade-util
db5.1-util:
  Installed: 5.1.29-5
  Candidate: 5.1.29-9
  Version table:
     5.1.29-9 0
        500 http://ftp.debian.org/debian/ stable/main i386 Packages
 *** 5.1.29-5 0
        100 /var/lib/dpkg/status
partimage-server:
  Installed: (none)
  Candidate: 0.6.8-3
  Version table:
     0.6.8-3 0
        500 http://ftp.debian.org/debian/ stable/main i386 Packages
db-upgrade-util:
  Installed: (none)
  Candidate: 5.3.0
  Version table:
     5.3.0 0
        500 http://ftp.debian.org/debian/ stable/main i386 Packages
root@server:~# 

我是否正确地将其db5.1-util保留,因为它取代了我安装libdb5.1所需的内容?python2.6的输出apt-cache如下所示:

root@server:~# apt-cache depends db5.1-util
db5.1-util
  Depends: libc6
  Breaks: libdb5.1
  Replaces: libdb5.1
root@server:~# apt-cache rdepends libdb5.1
libdb5.1
Reverse Depends:
  python2.6
  db5.1-util
  db5.1-util
  db5.1-util
root@server:~# apt-cache policy python2.6
python2.6:
  Installed: 2.6.8-1.1
  Candidate: 2.6.8-1.1
  Version table:
 *** 2.6.8-1.1 0
        100 /var/lib/dpkg/status
root@server:~# 

// 的输出apt-cache policy db5.1-util libdb5.1 libc6如下所示:

root@server:~# apt-cache policy db5.1-util libdb5.1 libc6
db5.1-util:
  Installed: 5.1.29-5
  Candidate: 5.1.29-9
  Version table:
     5.1.29-9 0
        500 http://ftp.debian.org/debian/ stable/main i386 Packages
 *** 5.1.29-5 0
        100 /var/lib/dpkg/status
libdb5.1:
  Installed: 5.1.29-5
  Candidate: 5.1.29-5
  Version table:
 *** 5.1.29-5 0
        100 /var/lib/dpkg/status
libc6:
  Installed: 2.19-18
  Candidate: 2.19-18
  Version table:
 *** 2.19-18 0
        500 http://ftp.debian.org/debian/ stable/main i386 Packages
        100 /var/lib/dpkg/status
root@server:~# 

答案1

在做 Jessie 时遇到了同样的问题apt upgrade(准备 dist 升级)。

解决方案就是简单地

apt-get remove db5.1-util

相关内容