您的位置:首页 > 编程语言

Ubuntu 源代码(Source Code) 编译安装 libvirt

2015-02-02 09:44 363 查看
问题描述:

从在Ubuntu下,源代码(Source Code)编译安装libvirt,为之后安装Xen虚拟机做准备。

运行环境:

操作系统:Ubuntu 12.04 x64位

libvirt的版本:1.04 (下载自http://libvirt.org/downloads.html)

精简过程:

./configure (./configure --with-xen=yes对Xen虚拟机的支持)

make

make install

具体方案:

Step1:

打开终端,解压源代码,并进入其目录。

Step2:

./configure

(./configure --prefix=/usr --localstatedir=/var  --sysconfdir=/etc 这样"貌似"能够覆盖原来的libvirt)

由于这次的安装是为了之后安装Xen虚拟机,所以采取以下的命令,添加libvirt对Xen虚拟机的支持(--with-xen=yes)。

./configure --prefix=/usr --localstatedir=/var --sysconfdir=/etc --with-xen=yes

Step3:

make

在make中,可能会出现如下错误(不完整)。

P1:error: Could not find libxml2 anywhere

S1:apt-get install libxml2 libxml2-dev

P2:error: You must install the GnuTLS library in order to compile and run libvirt

S2:apt-get install gnutls-bin libgnutls-dev

P3:error: You must install device-mapper-devel/libdevmapper >= 1.0.0 to compile libvirt

S3:apt-get install libdevmapper1.02.1  libdevmapper-dev

P4:error: You must install python-devel to build Python bindings

S4:apt-get install python-dev

P5:error: libnl-devel >= 1.1 is required for macvtap support

S5:apt-get install libnl-dev

P6:error:You must install the pciaccess module to build with udev

S6:apt-get install libpciaccess-dev

...................

Step4:

make install
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  libvirt 虚拟机 xen