0

I can't open the terminal, and I guess is an apt problem after installing python 3.7, this is the error that I get with an sudo apt update

E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /usr/bin/test -w /var/lib/command-not-found/ -a -e /usr/lib/cnf-update-db; then /usr/lib/cnf-update-db > /dev/null; fi' E: Sub-process returned an error code

Anyone has an idea about what could it be? I already tried with purge libappstream3 but it didn't work out... I really want to avoid reinstalling and losing my data. If anyone could give me a hand with this I'd appreciate, thanks!

PS: I'm on ubuntu 20.04 LTS, sorry I forgot to specify.

  • 1
    We don't know what OS & release you're using, but your description sounds like you changed the default python/python3 for your system, thus Ubuntu tools hat rely on python (the version that came pre-installed) will no longer function, which includes some GUI terminals, apt & front-end package tools. Change the default python back to what it was, and your system will be good again. (as we don't know your OS & release, we don't even know what defaults your system should have; the 3.7 doesn't help, my own system defaults to 3.9.4 for example..) – guiverc Apr 22 '21 at 02:20
  • Sorry I forgot to specify, fixed. I'm on ubuntu 20.04 LTS. I don't know how to return python as it was before, would you give a hand please? As an additional information I can only add that I ran this command ""sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1"" after installing the newer python's version. Thanks :) – Nahuel Alejandro Cáceres Apr 22 '21 at 02:29
  • Changing or deleting the standard python version of Ubuntu is a unrecoverable error. You need to reinstall.

    Boot from a live DVD or USB and reinstall. If your live DVD/USB is the same version as the installed Ubuntu version, you will see a "Reinstall" option. This will reinstall the system in the same setup as the existing installation, without formatting the partitions. That way, your user data and user configuration will be preserved.

    – David Apr 22 '21 at 03:56
  • I see, do You know where can I find the 20.04.2 release? I can only find the 20.04.2.0 which isn't the same one and I can't reisntall the os without it :/ – Nahuel Alejandro Cáceres Apr 22 '21 at 14:18
  • I need the desktop version, 64bits. In which part is there the 20.04.2? I can't find it, the one I found leaded me to the 24.04.2.0 instead https://cdimage.ubuntu.com/ubuntu-mate/releases/20.04.2/ – Nahuel Alejandro Cáceres Apr 22 '21 at 15:29
  • This are the options I got https://imgur.com/a/hqirm7Q

    Maybe I should install the new version over dev/sa2?

    – Nahuel Alejandro Cáceres Apr 22 '21 at 16:15

0 Answers0