Ubuntu 16.04 由于依赖性错误无法安装 libvirt-bin

Ubuntu 16.04 由于依赖性错误无法安装 libvirt-bin

正如标题所示,我目前正在为 libvirt-bin 上的依赖错误而苦恼。我需要它来为 Android 仿真设置 KVM(学习为其制作应用程序),但我无论如何都无法安装 libvirt-bin。以下是终端输出,包括我尝试深入依赖关系的兔子洞:

kyle@kyle-EP43-UD3L:~$ sudo apt -f install libvirt-bin ubuntu-vm-builder bridge-utils 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:  libvirt-bin : Depends: libnetcf1 (>= 1:0.2.2) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install netcf 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:  netcf : Depends: libnetcf1 (= 1:0.2.8-1ubuntu1) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnetcf1 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:  libnetcf1 : Depends: libnl-route-3-200 (>= 3.2.7) but it is not going to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnl-route-3-200 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:  libnl-route-3-200 : Depends: libnl-3-200 (= 3.2.27-1) but 3.2.27-1ubuntu0.16.04.1 is to be installed E: Unable to correct problems, you have held broken packages. kyle@kyle-EP43-UD3L:~$ sudo apt install libnl-3-200 Reading package lists... Done Building dependency tree        Reading state information... Done libnl-3-200 is already the newest version (3.2.27-1ubuntu0.16.04.1). 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

基本上,查看不会安装的依赖项列表,似乎是因为 lbnl-3-200 是 ubuntu 版本,而不是所有其他库所需的版本……

有什么办法可以解决这个该死的问题吗,我在网上找不到任何相关信息。

答案1

libvirt-bin请按照下列步骤进行安装:

  1. 下载libnl-route-3-200

  2. 现在同样下载libnetcf1libvirt-bin。在终端中将工作目录更改为下载目录并运行以下命令:

    sudo dpkg -i libnl-route-3-200_3.2.27-1ubuntu0.16.04.1_amd64.deb libnetcf1_0.2.8-1ubuntu1_amd64.deb libvirt-bin_1.3.1-1ubuntu10_amd64.deb
    
  3. 用于sudo systemctl restart libvirt-bin.service重新启动服务。

  4. 用于sudo systemctl status libvirt-bin.service查看libvirt状态。

答案2

我遇到了同样的问题。通过将 xenial-updates 和 xenial-backports 添加到源列表解决了这个问题。

相关内容