1

I tried to upgrade from Ubuntu 18.04 LTS to Ubuntu 20.04 LTS but got an error with Python 3 that gets corrupted (like in this). This is probably due to me changing the system Python3 (before I learnt that is bad practice, now I use virtualenv).

I tried to clean things and reinstall the original Python (Python3.6 I guess but not sure) and python3 -V issued Python3.6. This did not worked and I got the same corruption error as before.

I then tried to remove/reinstall python3 as suggested in some answers but I accidentally removed Python via apt-get: sudo apt-get remove python3, which you guessed removed lots of system parts depending on python3 (apt-get removes dependencies).

I ended up with a shell without graphic interface. Anyway, I successfully reinstalled what was missing (via sudo apt-get install ubuntu-desktop) but now apt/apt-get/dpkg are broken and I cannot reinstall Python3.6 on my system (cannot upgrade to Ubuntu 20 neither).

When issuing a apt-get/apt/dpkg command I get tons of the following error:

dpkg: error processing package [package_name] (--configure):
 dependency problems - leaving unconfigured
No apport report written because MaxReports is reached already

and one last:

Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

I'm currently trying to solve this issue but I fell into a rabbit hole of related issues and posts about this issue and for now none has solved mine. I tried many apt-get options (forcing, clean, autoremove, reinstall, apt instead of apt-get, directly dpkg with a force purge, etc...) without success.

I'm running out of idea (a fresh install seems to be the best option so far). Any suggestion?


Ubuntu 18.04.5 LTS 64-bit

python3 -V: Python 3.8.9

python -V: Python 2.7.17

which python3: /usr/bin/python3

find /usr/bin/python*:

/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python2.7-config
/usr/bin/python2-config
/usr/bin/python3
/usr/bin/python3.6m
/usr/bin/python3.7
/usr/bin/python3.8
/usr/bin/python3.9
/usr/bin/python3m
/usr/bin/python-config
Louis Lac
  • 121
  • 4
  • The fastest and simplest solution is to back up your data and clean-install 20.04. It's quite possible to tease out the conflicts and resolve them (done it many times). It might be quick...or it might be tedious (several days). Depends upon your level of skill and how badly your system is bonkered. From your description so far, seems like you are likely in the 'tedious' zone. – user535733 Apr 12 '21 at 18:29
  • I edited my question to add the correct format for Ubuntu version. Concerning the Ubuntu 18.04.5 LTS, this is what is stated in Settings > Details > About. – Louis Lac Apr 13 '21 at 07:52

0 Answers0