This brief guide explains how to fix libpulse dependency error and reinstall Pulseaudio in Ubuntu and its derivatives like Linux Mint and Pop OS.
Today, I accidentally removed Pulseaudio on my Ubuntu 18.04 desktop. When I tried to reinstall Puslseaudio using the following command:
$ sudo apt install pulseaudio
I encountered with the following error:
Reading package lists... Done Building dependency tree Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation: The following packages have unmet dependencies: pulseaudio : Depends: libpulse0 (= 1:11.1-1ubuntu7.4) but 1:12.2-9~bionic1 is to be installed Depends: pulseaudio-utils but it is not going to be installed E: Unable to correct problems, you have held broken packages.
I ran the following command to fix the missing dependencies.
$ sudo apt install -f
It didn't solve the error, because there were no missing packages.
I tried to update all packages using commands:
$ sudo apt update
$ sudo apt upgrade
$ sudo apt dist-upgrade
It didn't help either. My Ubuntu system is already up-do-date!
I tried everything I could and ran all steps suggested in various Ubuntu forums and blogs. None of them helped! I keep getting the same error every time. I almost gave up the idea of installing Pulseaudio. I decided to forcibly reinstall libpulse package one last time and It worked!! If you ever encountered with libpulse dependency problem while reinstalling Pulseaudio on Ubuntu, try the following workaround.
Fix libpulse dependency error and reinstall pulseaudio in Ubuntu
First, forcibly install libpulse0 package using the following commands:
$ sudo dpkg -P --force-depends libpulse0
$ sudo dpkg -P --force-depends libpulse-mainloop-glib0
$ sudo apt install libpulse0/bionic-updates
Then, install broken dependencies using command:
$ sudo apt --fix-broken install
Finally, reinstall Pulseaudio package with command:
$ sudo apt install pulseaudio
Pulseaudio should install now.
If you still can't install Pulseaudio, try the following commands instead:
$ sudo dpkg --force-depends -r libpulse0
$ sudo apt-get -f install
$ sudo apt install pulseaudio
Hope this helps.
4 comments
Thanks for this, it helped a lot, phew!
I had to do a few more things for my system, one of them was fixing user permissions
sudo chown -R $USER:$USER /home/$USER
Thanks, it helped !
Glad to know.
thank you very much