apt-get Falha para todos os pacotes

1

Sou um pouco novo no Linux (rodando o Ubuntu 14.04 - usando cerca de um ano), e recentemente comecei a ter problemas com o apt-get. Não consigo instalar ou remover nenhum pacote (erro abaixo). Eu tentei reinstalar esses pacotes, tentei excluir os arquivos deb e ainda recebo o mesmo erro.

    The following extra packages will be installed:
    python3-software-properties software-properties-common
    software-properties-gtk
    The following packages will be upgraded:
    python3-software-properties software-properties-common
    software-properties-gtk
    3 upgraded, 0 newly installed, 0 to remove and 412 not upgraded.
    108 not fully installed or removed.
    Need to get 0 B/126 kB of archives.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    WARNING: The following packages cannot be authenticated!
    dh-python software-properties-common software-properties-gtk
    python3-software-properties
    Install these packages without verification? [y/N] y
    (Reading database ... 305261 files and directories currently         installed.)
    Preparing to unpack .../software-properties-common_0.92.37.7_all.deb ...
    /var/lib/dpkg/info/software-properties-common.prerm: 6: /var/lib/dpkg/info/software-properties-common.prerm: py3clean: not found
    dpkg: warning: subprocess old pre-removal script returned error exit status 127
    dpkg: trying script from the new package instead ...
    /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
    dpkg: error processing archive /var/cache/apt/archives/software-properties-common_0.92.37.7_all.deb (--unpack):
    subprocess new pre-removal script returned error exit status 127
    /var/lib/dpkg/info/software-properties-common.postinst: 6: /var/lib/dpkg/info/software-properties-common.postinst: py3compile: not found
    dpkg: error while cleaning up:
    subprocess installed post-installation script returned error exit status 127
    Preparing to unpack .../software-properties-gtk_0.92.37.7_all.deb ...
    /var/lib/dpkg/info/software-properties-gtk.prerm: 6: /var/lib/dpkg/info/software-properties-gtk.prerm: py3clean: not found
    dpkg: warning: subprocess old pre-removal script returned error exit status 127
    dpkg: trying script from the new package instead ...
    /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
    dpkg: error processing archive /var/cache/apt/archives/software-properties-gtk_0.92.37.7_all.deb (--unpack):
    subprocess new pre-removal script returned error exit status 127
    /var/lib/dpkg/info/software-properties-gtk.postinst: 6: /var/lib/dpkg/info/software-properties-gtk.postinst: py3compile: not found
    dpkg: error while cleaning up:
    subprocess installed post-installation script returned error exit status 127
    Preparing to unpack .../python3-software-properties_0.92.37.7_all.deb ...
    /var/lib/dpkg/info/python3-software-properties.prerm: 6: /var/lib/dpkg/info/python3-software-properties.prerm: py3clean: not found
    dpkg: warning: subprocess old pre-removal script returned error exit status 127
    dpkg: trying script from the new package instead ...
    /var/lib/dpkg/tmp.ci/prerm: 6: /var/lib/dpkg/tmp.ci/prerm: py3clean: not found
    dpkg: error processing archive /var/cache/apt/archives/python3-software-properties_0.92.37.7_all.deb (--unpack):
    subprocess new pre-removal script returned error exit status 127
    /var/lib/dpkg/info/python3-software-properties.postinst: 6: /var/lib/dpkg/info/python3-software-properties.postinst: py3compile: not found
    dpkg: error while cleaning up:
    subprocess installed post-installation script returned error exit status 127
    Errors were encountered while processing:
    /var/cache/apt/archives/software-properties-common_0.92.37.7_all.deb
    /var/cache/apt/archives/software-properties-gtk_0.92.37.7_all.deb
    /var/cache/apt/archives/python3-software-properties_0.92.37.7_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
por Alan P 09.05.2017 / 19:00

1 resposta

0

py3compile: not found

O comando py3compile faz parte do pacote python3-minimal , que parece estar corrompido.

Para corrigir o problema, tente o seguinte:

  • Corrija um sistema com dependências quebradas no lugar:

    sudo apt-get  -f install
    
  • Reconfigure todos os pacotes descompactados, mas não configurados, por:

    sudo dpkg --configure -a
    
  • Se acima não ajudar, tente reinstalar python3-minimal package por:

    sudo apt install -f --reinstall python3-minimal
    

    Alternativamente, execute:

    apt-get download python3-minimal
    sudo dpkg -i *python3*.deb
    sudo apt install -f
    

    Ou faça o download do .pkg arquivo do kernel.org e instale a partir do o arquivo por:

    sudo dpkg -i python3-minimal_*.deb
    

Em seguida, certifique-se de que os comandos py3compile e py3clean sejam executáveis e sejam acessíveis a partir da variável PATH .

    
por 01.11.2017 / 16:20

Tags