I was having this error with .deb installation using ubuntu 22.04.
I run:
sudo dpkg --configure -a sudo apt update sudo apt upgrade sudo apt --fix-broken install
after this, the command back for me