Python 依赖问题

Python 依赖问题

尝试安装 python2.7.13 后,我无法使用我的 Ubuntu。

我尝试过sudo apt-cache policy python2.7 python2.7-dev,结果显示:

python2.7:
  Installed: 2.7.6-8ubuntu0.3
  Candidate: 2.7.6-8ubuntu0.3
  Version table:
 *** 2.7.6-8ubuntu0.3 0
        500 http: // ca.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http: // security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.7.6-8 0
        500 http: // ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
python2.7-dev:
  Installed: 2.7.6-8ubuntu0.3
  Candidate: 2.7.6-8ubuntu0.3
  Version table:
 *** 2.7.6-8ubuntu0.3 0
        500 http: // ca.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
        500 http: // security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
        100 /var/lib/dpkg/status
     2.7.6-8 0
        500 http: // ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

sudo apt-cache policy python

python:
  Installed: 2.7.13-1
  Candidate: 2.7.13-1
  Version table:
 *** 2.7.13-1 0
        100 /var/lib/dpkg/status
     2.7.5-5ubuntu3 0
        500 http: // ca.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages

它们是不同的版本...我尝试过,apt-get -f install结果给了我:

E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
E: Unable to correct dependencies

sudo apt-get install ubuntu-desktop给了我:

E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution)

我不知道该怎么做...

答案1

尝试sudo apt-get install --fix-broken && sudo apt-get autoremove && sudo apt-get update

如果这不能解决您的问题,请告诉我。

相关内容