Проблема зависимости Python после обновления Ubuntu 16.04

Когда я пытаюсь обновить пакеты, я получаю следующее.

sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run 'apt-get -f install' to correct these.
The following packages have unmet dependencies:
python : Depends: python-minimal (= 2.7.5-5ubuntu3) but 2.7.11-1 is installed
      Depends: libpython-stdlib (= 2.7.5-5ubuntu3) but 2.7.11-1 is installed
python-all : Depends: python (= 2.7.11-1) but 2.7.5-5ubuntu3 is installed
python-all-dev : Depends: python (= 2.7.11-1) but 2.7.5-5ubuntu3 is installed
python-dev : Depends: python (= 2.7.11-1) but 2.7.5-5ubuntu3 is installed
synaptic : Depends: libept1.5.0 but it is not installed
        Recommends: libgtk2-perl (>= 1:1.130) but it is not installed
        Recommends: rarian-compat but it is not installed
E: Unmet dependencies. Try using -f.

Я продолжил следующим предложение и использовал установку силы

The following NEW packages will be installed:
libept1.5.0
The following packages will be upgraded:
python
1 upgraded, 1 newly installed, 0 to remove and 18 not upgraded.
6 not fully installed or removed.
Need to get 0 B/215 kB of archives.
After this operation, 226 kB of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up python-minimal (2.7.11-1) ...
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
  File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
  File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
  File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
  File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct
dpkg: error processing package python-minimal (--configure):
 subprocess installed post-installation script returned error exit   status 1
Errors were encountered while processing:
python-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

Как я могу зафиксировать ту ошибку? Я могу понизить до 14,04? Я следовал за этим потоком, но он не работал на меня. Когда я выполняю предложенную команду, я получаю следующее:

Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Traceback (most recent call last):
File "/usr/local/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "/usr/local/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/local/lib/python2.7/compileall.py", line 16, in <module>
import struct
File "/usr/local/lib/python2.7/struct.py", line 1, in <module>
from _struct import *
ImportError: No module named _struct

Заранее спасибо.

3
задан 29 August 2016 в 22:52

2 ответа

Я нахожусь также на 16,04 и python

patfla@patfla-N550JV:~$ python
Python 2.7.12 (default, Jul  1 2016, 15:12:24) 
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from _struct import *
>>>

использования, который Вы могли бы изучить, как обновить Ваш Python 2.7.11 до 2.7.12.

0
ответ дан 1 December 2019 в 22:30

apt-get install --reinstall python3.8{,-minimal} libpython3.8{,-minimal,-stdlib} rhythombox-plugin-zeitgeist

Публикация в старой ветке - на случай, если кто-то приземлится здесь, как я, в поисках решения проблем с python3.

0
ответ дан 23 January 2021 в 05:27

Другие вопросы по тегам:

Похожие вопросы: