常规升级导致未满足的依赖性错误

常规升级导致未满足的依赖性错误

通过 Ubuntu 软件进行常规更新时出现 Python 3.5 未满足的依赖关系错误。

尝试后apt-get upgrade出现以下错误。

接下来是什么?

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: The package python3.5 needs to be reinstalled, but I can't find an archive for it.

$ apt-cache policy python 3 python 3.5
python:
  Installed: 2.7.11-1
  Candidate: 2.7.11-1
  Version table:
 *** 2.7.11-1 100
        100 /var/lib/dpkg/status
python:
  Installed: 2.7.11-1
  Candidate: 2.7.11-1
  Version table:
 *** 2.7.11-1 100
        100 /var/lib/dpkg/status
python3.5-cups:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-reportlab-accel:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-venv:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5:
  Installed: 3.5.2-2ubuntu0~16.04.3
  Candidate: 3.5.2-2ubuntu0~16.04.3
  Version table:
 *** 3.5.2-2ubuntu0~16.04.3 100
        100 /var/lib/dpkg/status
python3.5:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
python3.5-minimal:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
python3.5-apt:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-renderpm:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-doc:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-dbus:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-lxml:
  Installed: (none)
  Candidate: (none)
  Version table:
python3.5-gdbm:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5-stdlib:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
libreoffice-l10n-3.5:
  Installed: (none)
  Candidate: (none)
  Version table:
libpython3.5-minimal:
  Installed: 3.5.2-2ubuntu0~16.04.1
  Candidate: 3.5.2-2ubuntu0~16.04.1
  Version table:
 *** 3.5.2-2ubuntu0~16.04.1 100
        100 /var/lib/dpkg/status
libmwaw-0.3-3v5:
  Installed: (none)
  Candidate: (none)
  Version table:
povray-3.5:
  Installed: (none)
  Candidate: (none)
  Version table:
N: Unable to locate package 3

答案1

跑步

sudo dpkg --remove --force-all python3

然后

sudo apt-get update
sudo apt-get install python3

相关内容