Package-Management

嘗試安裝 python2 包時,Kali Linux libpython2.7 和 python-tk 不兼容

  • December 28, 2020

嗨我正在嘗試安裝apparmor-utils。當我輸入

sudo apt-get install apparmor-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:
libpython2.7-stdlib : Breaks: python-tk (< 2.7.14~rc1-1~) but 2.7.13-1 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.

我在 windows virtualbox Kali Rolling (2017.1) x64 上執行 linux kali 2017-04-24

目前在 Kali Linux 中,apparmor-utils是一個 python2 包。Python2 現在不受支持,並且可能通過代理該包。作為參考,上游 Debian 中的apparmorandapparmor-utils包現在是 python3,處於穩定狀態。所以 Kali 顯然落後於 Debian Stable(這對任何使用它的人來說都不是好兆頭)。

似乎 Kali 仍然包含(但不維護)apparmor-utils. 這就是您要安裝的內容。你可以從他們的回購中看到他們有一個python3-apparmor; 但是,他們沒有apparmor-utils我能看到的 python3。此外,似乎它們的 python2 包libpython2.7-stdlibpython-tk不兼容,這將阻止安裝任何需要它們的東西(如apparmor-utils)。

所以你的解決方案很簡單,停止使用 Kali。像往常一樣,它維護得很差。查看 Debian 上游並添加您想要的軟體包。

引用自:https://unix.stackexchange.com/questions/626378