6

I've recently deleted pulseaudio by mistake, which means that now I'm unable to listen to all audio, which means 90% of all I do on my pc is now off. I tried to reinstall pulseaudio from the command line, but this was the output:

~$ sudo apt install pulseaudio
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.1) but 1:12.2-5~bionic1 is to be installed
E: Unable to correct problems, you have held broken packages.

I've tried everything. sudo apt install -f doesn't work, dist-upgrade doesn't work, update, upgrade and autoremove all work properly and don't give back any error, and there are 0 packages to be installed, upgraded or removed. I've tried using apt, apt-get and aptitude. I've tried to fix the broken dependencies with synaptic. Nothing.

If I try to remove or regress libpulse0 it gives me an endless list of packages that are to be removed or will be removed.

I know that I can fix everything with a fresh install, but I'd rather not if at all possible, since last time was a small nightmare, what with UEFI and whatnot.

I'm really at my wits' end. Does anybody have any suggestion?

Xartab
  • 113
  • 1
  • 7
  • Have you tried downloading the package directly from their website? You should be able to download it, extract it, and run sudo dpkg -i (packagename) https://www.freedesktop.org/wiki/Software/PulseAudio/ – Minty Dec 18 '18 at 18:17
  • 4
    The clues to the answer are right there in your output: libpulse0 version 1:12.2-5~bionic1 is not an Ubuntu package - figure out which PPA or non-Ubuntu source you got it from using apt-cache policy, and uninstall all packages from that repository. Don't forget to disable that repository. Once you have reinstalled pulseaudio successfully, you can re-add the non-Ubuntu source. – user535733 Dec 18 '18 at 18:22
  • Thank you for replying. I did what you suggested, user535733, and I did in fact have a suse repository (for lutris), but even after deleting the packages and the repository, I still can't install pulseaudio. Minty, I downloaded the package from the site, but it's a tar.gz and it can't (or I don't know how) install it with dpkg. Should I install it its own way? – Xartab Dec 18 '18 at 19:51

3 Answers3

2

Ok, I've been defeated. Thinking it would be the pinnacle of cleverness, I installed the required libpulse0 library from a downloaded package.

...it didn't go well. Immediately afterwards apt told me that something like a hundred packages were not needed anymore, and the audio was still not working. I rebooted my laptop and, surprise, the desktop environment had disappeared, and there was only the command line.

I've just finished reinstalling everything (thank the linux gods for home partitions).

Sorry to all those who'll land here in search of a solution.

Xartab
  • 113
  • 1
  • 7
2

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 :D

Arun Joseph
  • 125
  • 5
  • No it does not help. The first command - sudo dpkg -P --force-depends libpulse0 fails with dpkg: error: --purge needs a valid package name but '–force-depends' is not: illegal package name in specifier '–force-depends': must start with an alphanumeric character. – Paul Benson Aug 18 '20 at 09:12
1

For anyone coming to this problem here is a solution that worked for me.

I had this problem because I installed pulseeffects from a ppa repository and that messed up my audio pretty bad so I tried rollback packages manually and even after having done so the audio problems remained because pulseaudio was still at a version not yet supported by my ubuntu and when trying to go back to the original version I stumbelded on the same error :

The following packages have unmet dependencies.
   pulseaudio : Depends: libpulse0 (= 1:11.1-1ubuntu7.1) but 1:12.2-5~bionic1 
   is to be installed
E: Unable to correct problems, you have held broken packages.

The solution was to use ppa-purge to rollback to native package. Install and basic use are described here How do I do a batch downgrade of packages from one repo back to canonical?

Hope this helps next ones with this problem.

ddattee
  • 118