How to fix broken packages on Pop_OS!

Hey guys,

i have the following question: i tried to install python 3 on my PC with Pop!_OS and did it via terminal.

“sudo apt update upgrade” to update and install the updates

then i entered:
“sudo apt install software-properties-common” where i got the following error:
"Waiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is heWaiting for cache lock: Could not get lock /var/lib/dpkg/lock-frontend. It is held by process 1174 (packagekitd) "

i ignored this one and added the repository and since this worked i then tried the following:

root@pop-os:/home/whoami# sudo apt install python3.7
Reading package lists… Done
Building dependency tree… Done
Reading state information… Done
You might want to run ‘apt --fix-broken install’ to correct these.
The following packages have unmet dependencies:
gir1.2-mutter-10 : Depends: libmutter-10-0 (= 42.2-0ubuntu1pop1~1656366415~22.04~8e50951) but 42.3-1ubuntu1pop1~1658401497~22.04~928bf97 is to be installed
python3.7 : Depends: python3.7-minimal (= 3.7.13-1+jammy2) but it is not going to be installed
Depends: libpython3.7-stdlib (= 3.7.13-1+jammy2) but it is not going to be installed
Depends: mime-support but it is not going to be installed
E: Unmet dependencies. Try ‘apt --fix-broken install’ with no packages (or specify a solution).
root@pop-os:/home/whoami# sudo apt --fix broken install
E: Command line option --fix is not understood in combination with the other options
root@pop-os:/home/whoami# sudo apt fix broken install pyhton3.7
E: Invalid operation fix

does somebody know how to fix this? I am new on pyhton and im not sure what to do…

thx
mr_bischof

Welcome!

You had a typo there (--fix-broken install required, not --fix broken install

Firstly, IIUC Pop!OS is based on Ubuntu so you should use “sudo apt full-upgrade” not just “upgrade”.

Secondly, the cache lock error means another APT process was running. If you didn’t run it, maybe waiting a while would have been good.

Good luck with --fix-broken-install, with all its hyphens.

That is incorrect unless you want to allow the system to auto uninstall/install packages.

Upgrade will not do a destructive upgrade, IE it will only replace packages that are already installed. It will not install any new packages and it will not uninstall any existing packages. Keep in mind that this means that if there is dependency blockage, those packages will not get touched.

full-upgrade is an alias for dist-upgrade which is the typical way that you upgrade stable version of Debian to the new stable version. This can be destructive as that is the nature of going from one distribution to another.

This is correct and if you have auto-upgrades on (the default in Ubuntu and Pop!OS) then when you turn on the system, it will at least download the updates if not install them. Periodically there is also a cron job that runs in the background that will do this (daily, weekly).

This should take care of most of your issues unless you are hybridizing between version of Pop!OS.

I am a Debian SID user so excuse my ignorance, but are you saying that python 3.7 does not exist in the Pop!OS repositories? Are you trying to use a beta or alpha release of python 3.7? In Debian, the 3.7 security release version (3.7.9) is still available.