Não é mais possível usar o apt-get para instalar devido a um erro com o apport

Não é mais possível usar o apt-get para instalar devido a um erro com o apport

Estou trabalhando em um PC com Windows 7 com um Virtual Box Xubuntu (Ubuntu 14.04.2 LTS, 64 bits). Ultimamente tenho tido problemas ao usar o comando 'apt-get' e também o Atualizador de Software. O atualizador de software não pode baixar uma das atualizações - tenho o suporte 2.14.1-0ubuntu3.10 e ele está tentando instalar o 2.14.1-0ubuntu3.11, mas falha.

Além disso, quando digito qualquer tipo de comando 'apt-get' ou 'dpkg', como 'apt-get upgrade', recebo erros como os seguintes, alguém sabe o que posso fazer?

Reading package lists...
Building 
dependency tree...
Reading state information...
The following packages will be upgraded:
  apport
1 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
2 not fully installed or removed.
Need to get 0 B/180 kB of archives.
After this operation, 20.5 kB of additional disk space will be used.
Do you want to continue? [Y/n] (Reading database ... 314480 files and directories currently installed.)
Preparing to unpack .../apport_2.14.1-0ubuntu3.11_all.deb ...
initctl: Unknown job: apport
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: warning: subprocess old pre-removal script returned error exit status 1
dpkg: trying script from the new package instead ...
initctl: Unknown job: apport
  File "/usr/bin/pyclean", line 63
    except (IOError, OSError), e:
                             ^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/apport_2.14.1-0ubuntu3.11_all.deb (--unpack):
 subprocess new pre-removal script returned error exit status 1
Traceback (most recent call last):
  File "/usr/bin/pycompile", line 35, in <module>
    from debpython.version import SUPPORTED, debsorted, vrepr, \
  File "/usr/share/python/debpython/version.py", line 24, in <module>
    from ConfigParser import SafeConfigParser
ImportError: No module named 'ConfigParser'
dpkg: error while cleaning up:
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 /var/cache/apt/archives/apport_2.14.1-0ubuntu3.11_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Responder1

Acabei de tentar compilar o arquivo python /usr/bin/pycleanno meu pc, compilei com python3 e recebi o mesmo erro, enquanto quando compilo com python2 não há erro.

Então, acho que você mudou algo em seu sistema que torna a versão padrão do python python3.

Você pode tentar consertar isso assim:

  • Execute o comando ls -l /usr/bin/pythone veja sua saída.
  • Se o arquivo /usr/bin/pythonapontar para python3.x , remova o link e substitua-o por um link para python2

    sudo rm /usr/bin/python
    sudo ln -s /usr/bin/python2.7 /usr/bin/python
    

    Agora python2.7 estará de volta como a versão padrão do python em seu sistema como deveria ser

informação relacionada