Falha ao atualizar de 16.10 para 17.04, agora o APT gera erros

3

Após uma atualização com falha, tenho um novo ícone no menu da barra superior

Equandoeuquiseratualizarouinstalarqualquerpacote,eutenhoesseproblema

$sudoapt-getupgradeReadingpackagelists...DoneBuildingdependencytreeReadingstateinformation...DoneYoumightwanttorun'apt--fix-brokeninstall'tocorrectthese.Thefollowingpackageshaveunmetdependencies:python3:PreDepends:python3-minimal(=3.5.1-4)but3.5.3-1isinstalledpython3-dev:Depends:python3(=3.5.3-1)but3.5.1-4isinstalledDepends:libpython3-dev(=3.5.3-1)but3.5.1-4isinstalledE:Unmetdependencies.Try'apt--fix-brokeninstall'withnopackages(orspecifyasolution).

Equandoeutenteiestecomando'apt--fix-brokeninstall'eutenhoestamensagem:

$sudoapt--fix-brokeninstallReadingpackagelists...DoneBuildingdependencytreeReadingstateinformation...DoneCorrectingdependencies...DoneThefollowingpackageswereautomaticallyinstalledandarenolongerrequired:libidl-2-0libjson-c3:i386libkeybinder0liborbit2libudev1:i386libvte-commonlibvte9libwings3libwraster5libwutil5linux-headers-4.8.0-34linux-headers-4.8.0-34-genericlinux-headers-4.8.0-37linux-headers-4.8.0-37-genericlinux-headers-4.8.0-38linux-headers-4.8.0-38-genericlinux-headers-4.8.0-39linux-headers-4.8.0-39-genericlinux-headers-4.8.0-41linux-headers-4.8.0-41-genericlinux-headers-4.8.0-44linux-headers-4.8.0-44-genericlinux-image-4.8.0-34-genericlinux-image-4.8.0-37-genericlinux-image-4.8.0-38-genericlinux-image-4.8.0-39-genericlinux-image-4.8.0-41-genericlinux-image-4.8.0-44-genericlinux-image-extra-4.8.0-34-genericlinux-image-extra-4.8.0-37-genericlinux-image-extra-4.8.0-38-genericlinux-image-extra-4.8.0-39-genericlinux-image-extra-4.8.0-41-genericlinux-image-extra-4.8.0-44-genericpython-appindicatorpython-apportpython-gconfpython-gnome2python-keybinderpython-notifypython-piston-mini-clientpython-problem-reportpython-pyorbitpython-vteubuntu-core-launcherUse'sudoaptautoremove'toremovethem.Thefollowingadditionalpackageswillbeinstalled:libpython3-devlibpython3-stdlibpython3Suggestedpackages:python3-docpython3-tkpython3-venvThefollowingpackageswillbeupgraded:libpython3-devlibpython3-stdlibpython33upgraded,0newlyinstalled,0toremoveand1484notupgraded.5notfullyinstalledorremoved.Needtoget0B/22.5kBofarchives.Afterthisoperation,0Bofadditionaldiskspacewillbeused.Doyouwanttocontinue?[Y/n]ySettinguppython3.5-minimal(3.5.3-1)...Traceback(mostrecentcalllast):File"/usr/lib/python3.5/py_compile.py", line 6, in <module>
    import importlib._bootstrap_external
  File "/usr/lib/python3.5/importlib/__init__.py", line 57, in <module>
    import types
  File "/usr/lib/python3.5/types.py", line 166, in <module>
    import functools as _functools
  File "/usr/lib/python3.5/functools.py", line 23, in <module>
    from weakref import WeakKeyDictionary
  File "/usr/lib/python3.5/weakref.py", line 12, in <module>
    from _weakref import (
ImportError: cannot import name '_remove_dead_weakref'
dpkg: error processing package python3.5-minimal (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of python3-minimal:
 python3-minimal depends on python3.5-minimal (>= 3.5.3-1~); however:
  Package python3.5-minimal is not configured yet.

dpkg: error processing package python3-minimal (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
                                                                                                          Errors were encountered while processing:
 python3.5-minimal
 python3-minimal
E: Sub-process /usr/bin/dpkg returned an error code (1)

Como posso resolver este problema?

    
por Nebil Aydi 17.04.2017 / 11:54

1 resposta

1

O seguinte foi baseado em este link , que acompanha o comentarista funcionou para mim.

  1. Executar sudo nautilus (no seu terminal)
  2. Vá para /usr/local/bin e exclua qualquer arquivo / atalho / pasta com "python3" nele
  3. Vá para /usr/local/lib e faça o mesmo
  4. Abra um novo Terminal (por exemplo, com Ctrl + Alt + T )
  5. Executar

    sudo apt --fix-broken install &&
         sudo apt -y update &&
         sudo apt -y upgrade &&
         sudo apt -y dist-upgrade &&
         sudo apt -f install &&
         sudo apt -y autoremove &&
         sudo apt autoclean &&
         sudo apt clean
    

    (Você pode combiná-lo em menos linhas, se quiser.)

  6. Reinicializar

  7. Execute o número 5 novamente
por 22.04.2017 / 22:54