首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装python2.7未满足的依赖关系问题-Ubuntu18.04

安装python2.7未满足的依赖关系问题-Ubuntu18.04
EN

Ask Ubuntu用户
提问于 2019-10-12 21:51:56
回答 1查看 1.9K关注 0票数 1

我最近清理了重新安装的Ubuntu18.04,现在想要安装python2.7,用于其他各种依赖项,但是我无法这样做。运行sudo apt install pythonsudo apt install python-minimal都有非常相似的错误:

python:

代码语言:javascript
复制
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-最低限度:

代码语言:javascript
复制
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-最低限度的输出:

代码语言:javascript
复制
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返回:

代码语言:javascript
复制
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-8300Hcpu@ 2.30GHz附加图形卡: GP107M GeForce GTX 1050移动电话

我是Ubuntu和Unix的新手,所以我希望这是一个初学者的错误,而且很容易修复。这是我提出的第一个问题,如果我还需要补充的话,请告诉我。

所有的帮助都将不胜感激,非常感谢!

编辑:添加sudo apt update的输出

代码语言:javascript
复制
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.
EN

回答 1

Ask Ubuntu用户

发布于 2019-10-30 12:28:45

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

Python 2.7在2020年以后不会被维护。最初,没有正式的日期。最近,这一日期已经更新到2020年1月1日。

请避免使用Python 2.7

票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1180580

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档