Apt update error

I'm having some issues using this command. I can't understand what to do. Can you help me?

Have you installed any versions of python on your copy of Zorin OS?
Your error implies that there is a conflict in your python3.

If not, please run:

sudo apt --fix-broken dist-upgrade

If that does not resolve the issue:

sudo apt install --reinstall libappstream4

Download the following package and run it by double clicking it to reinstall libappstream:

Yes, I have installed python 3.11 recently.
I have tried reinstalling libappstream4, but it didn't work.

This is the issue.

Python is quite touchy and many applications and installation processes rely on the Default System Python.
If a user up's python beyond what comes with the distribution - it can really muddle up the works.
This is true on any distro that is not a Rolling Distro.

@337harvey or others who are well versed with python may be able to help you to switch between python versions at need... But I personally consider that a shaky and tenuous exercise.
If it was me, I would remove python 3.11 and stick with the system default.

1 Like

Oh, I didn't know. I made python 3.11 system default. The previous version was python 3.8. So, are you telling me to downgrade? If yes, please tell me how.

This may depend on how you installed python 3.11
If you installed it through terminal > APT with a ppa repository, remove python 3.11

sudo apt remove --purge python 3.11

Install 3.8 immediately after:

sudo apt install python3.8

Often, running the earlier package is all that is needed to "downgrade". However... as stated- python is more tricky and fickle.
If you used a repository, you need to remove that repository as well to prevent the next upgrade command from upgrading python based on that repository version.
If you installed python 3.11 from source, you must manually remove the file sit created unless that source maintainer was kind enough to include the make uninstall process.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.