Libpulse依赖性错误-无法在Ubuntu中重新安装Pulseaudio

时间:2020-03-21 11:46:00  来源:igfitidea点击:

本简要教程说明了如何修复libpulse依赖错误以及如何在Ubuntu及其衍生版本(如Linux Mint)中重新安装Pulseaudio。
今天,我不小心在Ubuntu 18.04桌面上删除了Pulseaudio。
当我尝试使用以下命令重新安装Puslseaudio时:

$sudo apt install pulseaudio

我遇到以下错误:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This Jan 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 Jan 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.

我运行以下命令来修复缺少的依赖项。

$sudo apt install -f

它没有解决错误,因为没有丢失的软件包。

我尝试使用命令更新所有软件包:

$sudo apt update
$sudo apt upgrade
$sudo apt dist-upgrade

它也没有帮助。
我的Ubuntu系统已经更新了!

我竭尽所能,并运行了各种Ubuntu论坛和教程 中建议的所有步骤。
他们都没有帮助!我每次都会收到相同的错误。
我几乎放弃了安装Pulseaudio的想法。
上一次,我决定强行重新安装libpulse软件包,然后它起作用了!!如果在Ubuntu上重新安装Pulseaudio时遇到libpulse依赖问题,请尝试以下解决方法。

修复libpulse依赖错误并在Ubuntu中重新安装Pulseaudio

首先,使用以下命令强制安装libpulse0软件包:

$sudo dpkg -P --force-depends libpulse0
$sudo dpkg -P --force-depends libpulse-mainloop-glib0
$sudo apt install libpulse0/bionic-updates

然后,使用以下命令安装损坏的依赖项:

$sudo apt --fix-broken install

最后,使用以下命令重新安装Pulseaudio软件包:

$sudo apt install pulseaudio

Pulseaudio现在应该安装。

如果仍然无法安装Pulseaudio,请尝试以下命令:

$sudo dpkg --force-depends -r libpulse0
$sudo apt-get -f install
$sudo apt install pulseaudio