我试图从debian lenny更新挤压我的64位根服务器,并做了以下事情:
最后一步导致以下错误输出:
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: linux-image-2.6-amd64: Depends: linux-image-2.6.32-5-amd64 but it is not going to be installed E: Broken packages
这是我的sources.list
deb ftp://mirror.hetzner.de/debian/packages squeeze main contrib non-free deb ftp://mirror.hetzner.de/debian/security squeeze/updates main contrib non-free deb http://ftp.de.debian.org/debian squeeze main non-free contrib deb-src http://ftp.de.debian.org/debian squeeze main non-free contrib deb http://security.debian.org/ squeeze/updates main contrib non-free deb-src http://security.debian.org/ squeeze/updates main contrib non-free
我也可以跑
aptitude upgrade
但是我不确定这是不是一个好主意
….
74个软件包升级,111个新安装,16个删除和0个未升级。
….
删除以下软件包:libept0 linux-image-2.6-amd64 php5-mysql
安装以下软件包:libsasl2-modules [2.1.23.dfsg1-7(stable,stable)]
…
apt-get -s dist-upgrade返回:
Reading package lists... Done Building dependency tree Reading state information... Done Calculating upgrade... Failed The following packages have unmet dependencies: udev: Breaks: linux-image-2.6-amd64 (< 2.6.28) but 2.6.26+17+lenny1 is to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
apt-get升级告诉我它阻碍了很多:
Reading package lists... Done Building dependency tree Reading state information... Done The following packages have been kept back: apache2-mpm-prefork apache2.2-common apt aptitude bash cron diff djvulibre-desktop exim4 exim4-base exim4-config exim4-daemon-light gettext ghostscript gnupg gpgv grub grub-common imagemagick iproute iptables lftp libapache2-mod-php5 libaprutil1 libcups2 libcupsimage2 libcurl3 libdate-manip-perl libdevmapper1.02.1 libdjvulibre21 libgs8 libgtk2.0-0 libgtk2.0-bin libkrb5-dev libkrb53 libpam-modules libpam-runtime libpango1.0-0 libpango1.0-dev libphp-pclzip libpq5 librsvg2-2 libsasl2-2 libthai-data libthai0 libx11-6 libx11-dev libxcb1 libxcb1-dev libxi6 linux-image-2.6-amd64 lvm2 munin-node openssh-client openssh-server php5-common php5-gd php5-imagick php5-mysql python python-minimal python2.5 python2.5-minimal rrdtool smartmontools sysv-rc udev 0 upgraded, 0 newly installed, 0 to remove and 67 not upgraded.
然后,我想也许有些东西是搁置的,但是
dpkg --get-selections | grep hold
什么也不返回
在此之前,我在过去2年中安装了很多东西,那台机器一直在运行。 我记得最近有一些与munin有关的问题,我需要修改apt-sources来检索1.4.7版本。 我可能也有一些挤包在那里?
什么似乎是奇怪的:如果我检查/ etc / debian_version它说:6.0.5
另外我读到现在使用aptitude并不是一个好主意,或者说:不要混合使用apt-get和使用apt-get。 过去我可能也使用过时机。
我试图安装linux-image-2.6.32-5-amd64作为炖,但也失败了
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: linux-image-2.6.32-5-amd64: Depends: linux-base (>= 2.6.32-45) but it is not going to be installed E: Broken packages
我理解这个消息是否正确? 如果我想安装2.6.32-5我需要一个版本> = 2.6.32-45应该如何工作?
所以我继续recursion,这意味着:试图安装这些依赖导致:
最后一个,不能安装,因为它是一个“虚拟包”
Package perlapi-5.10.1 is a virtual package provided by: You should explicitly select one to install. E: Package perlapi-5.10.1 has no installation candidate
在那里,我又被困住了。 apt-cache search perlapi只是返回了两个包。 libperl-apireference-perl取决于perlapi-5.10.1和perl-base声明是最新版本
看起来像我已经安装了perl 5.14.2。 如果我没有弄错,那不是不稳定的。 据我所知,降级会解决这个问题,对吧?
所以我从debian档案库降级到perl 5.10。 现在运行apt-get upgrade ,如果这是正确的方法,我会感到困惑,因为会有很多变化
11 upgraded, 26 newly installed, 76 to remove and 44 not upgraded.
一些将被删除的包看起来很重要,我在做什么,例如php5-mysql munin munin-common munin-node
这是一个很好的select方法,然后尝试修复所有这些包/服务?
太好了! 我快到那里了
aptitude install perl
降级了许多其他的软件包。 那么运行apt-get upgrade不会再造成任何麻烦,于是我转向了
apt-get dist-upgrade
终于顺利通过了。
非常感谢,特别是炖!
看来你是从推荐的升级过程开始的,这很好。 我build议试图坚持,而不是过早做一个远程升级。 这个过程是通过在数千个系统上进行testing得出的,而且我们认为这是您顺利升级的最佳机会。
在这种情况下,当你正在进行apt-get upgrade我们正在预计很多软件包被阻止。 这是devise。 我们只想进行最小的升级,以便安装新的内核和udev,然后重新启动,然后使用dist-upgrade完成其余的dist-upgrade 。
你应该专注于这个错误:
linux-image-2.6-amd64: Depends: linux-image-2.6.32-5-amd64 but it is not going to be installed
有一些原因,为什么不想安装linux-image-2.6.32-5-amd64 。 通过apt-get install linux-image-2.6.32-5-amd64来直接安装它,或者安装它,或者会告诉你这个软件包有什么问题。 当这会导致另一个软件包出现问题时,请尝试直接安装它,直到find根本原因为止。 一旦内核成功安装,请从这里继续升级说明。
一个这样做的工件将有可能是不希望的是将linux-image-2.6.32-5-amd64包标记为自动安装。 升级完成后,您对结果满意,您可以运行apt-mark auto linux-image-2.6.32-5-amd64将该软件包标记为自动安装。
/etc/debian_version读取6.0.5的原因是您已经更新了base_files软件包。 这不是一个惊喜。
aptitude和apt-get的问题已经在几年前通过apt-get 7.0版本解决了,你可以随意的将它们混合使用。 事实上,Debianbuild议过去从一个主要版本升级到另一个主要版本,现在推荐apt-get,Debian推荐使用两者。 我们会build议哪一个似乎更好地为一个给定的升级工作。 在lenny-> squeeze升级中,aptitude倾向于认为寻找最佳升级path“太困难”,apt-get中更简单的依赖关系解决scheme适用于更多人。
从主要版本到另一个升级需要你这样做:
apt-get update apt-get dist-upgrade
而已。 是的,从/etc/apt/sources.listreplace发行版名称,例如sed -i -e 's/lenny/squeeze/g' /etc/apt/sources.list 。
但是你的错误似乎是使用upgrade而不是dist-upgrade 。
另外,如果出现问题,你有备份,对不对?