我似乎无法在 Ubuntu Server 14.04 上安装自定义版本的 libvirt。我正在使用这PPA 和我使用以下方法手动粘贴以下几行到我的来源列表文件:
deb http://ppa.launchpad.net/zulcss/esx/ubuntu trusty main
deb-src http://ppa.launchpad.net/zulcss/esx/ubuntu trusty main
我还创建了以下内容/etc/apt/首选项文件:
Package: libvirt-bin
Pin: origin ppa.launchpad.net
Pin-Priority: 610
Package: libvirt-bin
Pin: origin us.archive.ubuntu.com
Pin-Priority: 600
Package: libvirt-bin
Pin: origin security.ubuntu.com
Pin-Priority: 590
以下是输出apt-缓存策略 libvirt-bin
libvirt-bin:
Installed: (none)
Candidate: 1.2.2-0ubuntu9
Package pin: 1.2.2-0ubuntu9
Version table:
1.2.2-0ubuntu13.1.14 610
500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
100 /var/lib/dpkg/status
1.2.2-0ubuntu13.1.7 610
500 http://security.ubuntu.com/ubuntu/ trusty-security/main amd64 Packages
1.2.2-0ubuntu13 610
500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
1.2.2-0ubuntu9 610
500 http://ppa.launchpad.net/zulcss/esx/ubuntu/ trusty/main amd64 Packages
以下是我实际尝试安装时发生的情况:
root@ubuntu:/etc/apt/sources.list.d# apt-get install libvirt-bin
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: libvirt0 (= 1.2.2-0ubuntu9) but 1.2.2-0ubuntu13.1.14 is to be installed
E: Unable to correct problems, you have held broken packages.
root@ubuntu:/etc/apt/sources.list.d#
有人能想到一种无需手动编译就能解决这个问题的方法吗?
答案1
为 PPA 中的所有软件包分配更高的优先级:
Package: *
Pin: origin ppa.launchpad.net
Pin-Priority: 610
如果您仅为 分配优先级libvirt-bin
,则依赖包(例如)libvirt0
不会受到影响,因此apt-get
会为这些包选择最高可用版本,即来自 Ubuntu 的版本。PPA 提供以下软件包:
libvirt-bin
libvirt-dev
libvirt-doc
libvirt0
libvirt0-dbg
因此,您还可以为 justlibvirt-bin
和分配优先级libvirt0
:
Package: libvirt-bin libvirt0
Pin: origin ppa.launchpad.net
Pin-Priority: 610
答案2
创建配置
sudo nano /etc/apt/preferences.d/zulcss-esx-ppa-pin
与内容
Package: *
Pin: release o=LP-PPA-zulcss-esx
Pin-Priority: 1001
支持此 PPA 中的所有软件包。
我也对我的电力供应协议。