![22.04:如何解决“libdbus-1-dev:依赖:libdbus-1-3(= 1.12.20-2ubuntu4)但需要安装 1.12.20-3~devacom”?](https://linux22.com/image/946689/22.04%EF%BC%9A%E5%A6%82%E4%BD%95%E8%A7%A3%E5%86%B3%E2%80%9Clibdbus-1-dev%EF%BC%9A%E4%BE%9D%E8%B5%96%EF%BC%9Alibdbus-1-3%EF%BC%88%3D%201.12.20-2ubuntu4%EF%BC%89%E4%BD%86%E9%9C%80%E8%A6%81%E5%AE%89%E8%A3%85%201.12.20-3~devacom%E2%80%9D%EF%BC%9F.png)
我一直在尝试编译一些东西(ffmpeg,smooth),然后遇到了这个 dbus 错误。这似乎与 Ubuntu 22.04 有关,因为我在 18.04 或 20.04 中编译 ffmpeg 时没有遇到问题。
$ apt install libgtk-3-dev
Reading package lists... Done
Building dependency tree... Done
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:
libdbus-1-dev : Depends: libdbus-1-3 (= 1.12.20-2ubuntu4) but 1.12.20-3~devacom is to be installed
E: Unable to correct problems, you have held broken packages.
$ apt install libsdl2-dev
Reading package lists... Done
Building dependency tree... Done
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:
libdbus-1-dev : Depends: libdbus-1-3 (= 1.12.20-2ubuntu4) but 1.12.20-3~devacom is to be installed
E: Unable to correct problems, you have held broken packages.
$ apt install libdbus-1-dev
Reading package lists... Done
Building dependency tree... Done
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:
libdbus-1-dev : Depends: libdbus-1-3 (= 1.12.20-2ubuntu4) but 1.12.20-3~devacom is to be installed
E: Unable to correct problems, you have held broken packages.
答案1
因为依赖关系libdbus-1-dev
是libdbus-1-3 (= 1.12.20-2ubuntu4)
确切地版本“1.12.20-2ubuntu4”无法与版本“1.12.20-3~devacom”一起使用。
查看/etc/apt/sources.list.d
“devacom”版本的来源并将其删除。
我猜你有一个与 Ubuntu 20.04 中的“devacom”相关的启动板仍然配置。也许是这个:https://launchpad.net/~devacom
答案2
将“libdbus-1-dev:依赖:libdbus-1-3(= 1.12.20-2)但需要安装 1.12.24-0+deb10u1”添加到 /etc/apt/sources.list