Então eu recentemente atualizei tentei atualizar o ubuntu a partir de 16.04.3 e estou tendo problemas com dependências em pacotes python. A saída do sudo apt-get check é mostrada abaixo. Eu também não consigo desinstalar nenhum dos pacotes abaixo porque eles parecem depender um do outro para isso também
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-dev : Depends: python (= 2.7.11-1) but 2.7.5-5ubuntu3 is installed
E: Unmet dependencies. Try using -f.
Além disso, a saída do sudo apt-get install -f (após a lista de pacotes autoremove)
The following additional packages will be installed:
python
Suggested packages:
python-doc
The following packages will be upgraded:
python
1 to upgrade, 0 to newly install, 0 to remove and 67 not to upgrade.
2 not fully installed or removed.
Need to get 0 B/137 kB of archives.
After this operation, 36.9 kB disk space will be freed.
Do you want to continue? [Y/n] y
Setting up python-minimal (2.7.11-1) ...
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)
Edit: Saída do sudo dpkg --configure -a
dpkg: dependency problems prevent processing triggers for python-support:
python-support depends on python-minimal; however:
Package python-minimal is not configured yet.
dpkg: error processing package python-support (--configure):
dependency problems - leaving triggers unprocessed
dpkg: dependency problems prevent configuration of python-dev:
python-dev depends on python (= 2.7.11-1); however:
Version of python on system is 2.7.5-5ubuntu3.
dpkg: error processing package python-dev (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python-support
python-dev
Editar: Tentando as instruções em Erro ao instalar qualquer coisa usando o apt-get
$ sudo dpkg -i --force-all *.deb
[sudo] password for simos:
(Reading database ... 497453 files and directories currently installed.)
Preparing to unpack libpython2.7-minimal_2.7.12-1ubuntu0~16.04.2_amd64.deb ...
Unpacking libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.2) over (2.7.12-1ubuntu0~16.04.2) ...
Selecting previously unselected package python2.7.
Preparing to unpack python2.7_2.7.12-1ubuntu0~16.04.2_amd64.deb ...
Unpacking python2.7 (2.7.12-1ubuntu0~16.04.2) over (2.7.12-1ubuntu0~16.04.2) ...
Preparing to unpack python2.7-minimal_2.7.12-1ubuntu0~16.04.2_amd64.deb ...
Unpacking python2.7-minimal (2.7.12-1ubuntu0~16.04.2) over (2.7.12-1ubuntu0~16.04.2) ...
Selecting previously unselected package python-minimal.
Preparing to unpack python-minimal_2.7.11-1_amd64.deb ...
Unpacking python-minimal (2.7.11-1) over (2.7.11-1) ...
Setting up libpython2.7-minimal:amd64 (2.7.12-1ubuntu0~16.04.2) ...
Setting up python2.7-minimal (2.7.12-1ubuntu0~16.04.2) ...
Setting up python-minimal (2.7.11-1) ...
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 (--install):
subprocess installed post-installation script returned error exit status 1
Setting up python2.7 (2.7.12-1ubuntu0~16.04.2) ...
Processing triggers for desktop-file-utils (0.22-1ubuntu5.1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for gnome-menus (3.13.3-6ubuntu3.1) ...
Processing triggers for bamfdaemon (0.5.3~bzr0+16.04.20160824-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
python-minimal
Editar: conteúdo do arquivo sources.list
# deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ dists/precise/main/binary-i386/
# deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ dists/precise/restricted/binary-i386/
# deb cdrom:[Ubuntu 12.04.3 LTS _Precise Pangolin_ - Release amd64 (20130820.1)]/ precise main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb http://gb.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial-updates main restricted
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ xenial universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial universe
deb http://gb.archive.ubuntu.com/ubuntu/ xenial-updates universe
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://gb.archive.ubuntu.com/ubuntu/ xenial multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial multiverse
deb http://gb.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial-updates multiverse
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://gb.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://gb.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu xenial-security main restricted
deb-src http://security.ubuntu.com/ubuntu xenial-security main restricted
deb http://security.ubuntu.com/ubuntu xenial-security universe
deb-src http://security.ubuntu.com/ubuntu xenial-security universe
deb http://security.ubuntu.com/ubuntu xenial-security multiverse
deb-src http://security.ubuntu.com/ubuntu xenial-security multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu precise partner
# deb-src http://archive.canonical.com/ubuntu precise partner
#g77
# deb http://cz.archive.ubuntu.com/ubuntu hardy-updates main universe