Debian 6 — 安装了错误的 Python 2.6(有 2.6.6-8+b1,需要 2.6.6-8+deb6u3)

Debian 6 — 安装了错误的 Python 2.6(有 2.6.6-8+b1,需要 2.6.6-8+deb6u3)

在 Debian GNU/Linux 6.0.10 上

我正在尝试安装 mailutils。

apt-get install mailutils
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:
 mailutils : Depends: libmailutils2 (> 1:2.1) but it is not going to be installed
             Depends: libpython2.6 (>= 2.6) but it is not going to be installed
E: Broken packages

因此我将依赖项追溯到 python 并得到:

libpython2.6 : Depends: python2.6 (= 2.6.6-8+b1) but 2.6.6-8+deb6u3 is to be installed

因此,尽管看起来我有 2.6.6-8,但我有错误的品种。

我想我可以删除它然后重新安装,但是也没有运气:

apt-get remove python2.6
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:
 nginx-common : Depends: python but it is not going to be installed
E: Broken packages

我也尝试过

apt-get clean && apt-get update
apt-get upgrade
apt-get dist-upgrade
aptitude reinstall python2.6
apt-get check
apt-get -f install
apt-get clean

大多数人都会遇到各种情况。似乎没有什么办法可以解决这个问题。

我的固定设置为:

cat /etc/apt/preferences
Package: *
Pin: release stable
Pin-Priority: 9000

我将其固定以便尝试升级和 dist-upgrade。

来源如下:

cat /etc/apt/sources.list
# Main repo
deb http://http.debian.net/debian squeeze main non-free contrib
deb-src http://http.debian.net/debian squeeze main non-free contrib
#deb http://packages.linuxmint.com debian import

# Security
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb-src http://security.debian.org/ squeeze/updates main contrib non-free

我使用 mint import 来安装 Firefox。实际上,我怀疑它可能导致安装了错误的 Python。

有任何想法吗?

谢谢。

答案1

pyhton2.6正在搜索http://packages.debian.org/(具体来说https://packages.debian.org/search?keywords=python2.6&searchon=names&suite=all§ion=all) 表明 python2.6 的 2.6.6-8+deb6u3 版本(在撰写此答案时)在 squeeze-lts 发行版中可用。请参阅https://wiki.debian.org/LTS/使用了解如何使用 LTS。基本上可以归结为将以下内容添加到您的 apt 源中:

deb http://httpredir.debian.org/debian squeeze-lts main contrib non-free

添加此内容并更新可用包列表后,您应该能够使用以下方法安装指定的 python2.6 版本

aptitude install python2.6=2.6.6-8+deb6u3

答案2

您尝试过 apt-get -f install 吗?这样能解决问题吗?

相关内容