安装 python2.7 未满足的依赖关系问题 - Ubuntu 18.04

安装 python2.7 未满足的依赖关系问题 - Ubuntu 18.04

我最近重新安装了 Ubuntu 18.04,现在想安装 python2.7 以获取其他各种依赖项,但是无法这样做。 运行后sudo apt install python两者sudo apt install python-minimal都有非常相似的错误:

Python:

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.
 python : PreDepends: python-minimal (= 2.7.15~rc1-1) but it is not going to be installed
          Depends: python2.7 (>= 2.7.15~rc1-1~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

python-最小:

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.
 python-minimal : Depends: python2.7-minimal (>= 2.7.15~rc1-1~) but it is not going to be installed
                  Recommends: python but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

安装 python2.7-minimal 然后输出:

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.
 python2.7-minimal : Depends: libpython2.7-minimal (= 2.7.15-4ubuntu4~18.04.1) but 2.7.15-4ubuntu4~18.04.2 is to be installed
                     Recommends: python2.7 but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

安装 python2.7 会遇到与之前完全相同的错误,并且 libpython2.7 已经安装,因为apt-cache policy libpython2.7返回:

libpython2.7:
  Installed: 2.7.15-4ubuntu4~18.04.2
  Candidate: 2.7.15-4ubuntu4~18.04.2
  Version table:
 *** 2.7.15-4ubuntu4~18.04.2 100
        100 /var/lib/dpkg/status
     2.7.15-4ubuntu4~18.04.1 500
        500 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic-updates/main amd64 Packages
        500 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic-security/main amd64 Packages
     2.7.15~rc1-1 500
        500 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic/main amd64 Packages

是的,我已经运行了sudo apt updateupgrade并且我已经寻找答案好几天了,但没有成功。任何帮助都将不胜感激,因为我认为无法安装 python2.7 可能与 Ubuntu 无法识别硬件端口(例如 HDMI)并且无法更改亮度有关。

硬件信息:产品名称:Acer Aspire A715-72G 处理器:Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz 附加显卡:GP107M [GeForce GTX 1050 Mobile]

我对 Ubuntu 和 Unix 都很陌生,所以我希望这只是一个初学者的错误,并且很容易修复。这是我问的第一个问题,所以如果我还有什么需要补充的,请告诉我。

非常感谢所有帮助,非常感谢!

编辑:添加输出sudo apt update

Hit:1 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic InRelease
Hit:2 http://ppa.launchpad.net/apandada1/brightness-controller/ubuntu bionic InRelease              
Hit:3 http://archive.canonical.com/ubuntu bionic InRelease                                          
Hit:4 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic-updates InRelease                    
Ign:5 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu bionic InRelease                            
Hit:6 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic-backports InRelease                  
Hit:7 http://ppa.launchpad.net/graphics-drivers/ppa/ubuntu bionic InRelease                         
Hit:8 http://ftp.ticklers.org/archive.ubuntu.org/ubuntu bionic-security InRelease                   
Err:9 http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu bionic Release                              
  404  Not Found [IP: 91.189.95.83 80]
Reading package lists... Done                                                 
E: The repository 'http://ppa.launchpad.net/fkrull/deadsnakes/ubuntu bionic Release' does not have a Release file.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

答案1

也许你会知道这一点,但这并不是你问题的解决方案,但是

2020 年后,Python 2.7 将不再维护。最初没有正式的维护日期。最近,该日期已更新为 2020 年 1 月 1 日。

请避免使用Python 2.7

相关内容