Ubuntu 源代碼(Source Code) 編譯安裝 libvirt

問題描述:

從在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

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章