0

I accidentally removed Python from Ubuntu 18.04, graphical interface gone, and now I can't even reinstall it.

I tried to re-install the graphical interface with sudo apt-get install --reinstall ubuntu-desktop, but I've obtained a list of dependencies which were not satisfied (the ones depending on Python I suppose). Using àpt --fix-broken install doesn't work as well, as I obtain errors concerning dpkg: E: sub-process /usr/bin/dpkg returned an error code(1).

Is there a way to fix this without reinstalling Ubuntu? Many thanks

EDIT: output of sudo apt-get install python3-all and the output of sudo apt-get --fix-broken install IMG-3402.jpg

raf
  • 31
  • 6
  • 2
    Does this answer your question? [Deleted the python binary, and can't recover using apt-get, what can I do?](https://askubuntu.com/questions/565438/deleted-the-python-binary-and-cant-recover-using-apt-get-what-can-i-do) – user535733 Mar 31 '20 at 23:45
  • New versions of Ubuntu use python3. Python2 is obsolete and only if you have manually installed some older package that is not yet updated, will you also get python2.7. But procedure to try to fix is the same. – oldfred Apr 01 '20 at 02:55
  • 1
    Does this answer your question? [Removed Python 3 and now Ubuntu Software Center, terminal and other applications don't work](https://askubuntu.com/questions/384033/removed-python-3-and-now-ubuntu-software-center-terminal-and-other-applications) – karel Apr 01 '20 at 05:53
  • Thank you for all your comments. Appreciated. @user535733 it doesn't work. I have python 2.7 installed, but when I try to fix other packages with ``apt --fix-broken install`` it still returns an error – raf Apr 01 '20 at 09:54
  • 1
    Show us complete output, not summaries. Search for `error code(1)` and you will see why that's too vague to to be useful. – user535733 Apr 01 '20 at 13:31
  • I've uploaded the output. First we have ```dependencies not satisfied``, in which ``apt-get --fix-broken install is recommended. This last command yields ``dpkg: error processing archive``, this seems to be due when it is trying to overwrite certain files – raf Apr 01 '20 at 15:18
  • No matter what I do I can’t install python3-distutils or python3-lib2tp3. I believe that for doing so the package manager relies on them... – raf Apr 02 '20 at 11:53

1 Answers1

1

I reinstalled Ubuntu. It is a faster option

raf
  • 31
  • 6