From:http://blog.163.com/gjx0619@126/blog/static/12740839320114494341832/
#./configure (如果有老版本的libvirt,建议使用 ./configure --prefix=/usr --libdir=/usr/lib64 --localstatedir=/var --sysconfdir=/etc
:libdir是原来版本的/libvirt.so.0指向的目录)
...
checking libxml2 xml2-config >= 2.6.0 ... configure: error: Could not find libxml2 anywhere (see config.log for details).
#
#apt-cache search libxml2
aolserver4-nsxml - Module for XML support in aolsever4
docbook-xml - standard XML documentation system for software and systems
docbook5-xml - standard XML documentation system for software and systems
libgdome2-0 - DOM level2 library for accessing XML files
libgdome2-dev - Development files for libgdome2
gir-repository-dev - XML sources files for the GObject introspection repository
libglobus-libxml2-dev - Globus Toolkit - LibXML2 Library Development Files
libglobus-libxml2 - Globus Toolkit - LibXML2 Library
libgdome2-cpp-smart-dev - C++ bindings for GDome2 DOM implementation
libgdome2-cpp-smart0c2a - C++ bindings for GDome2 DOM implementation
libgdome2-ocaml-dev - OCaml bindings for GDome2 DOM implementation
libgdome2-ocaml - OCaml bindings for GDome2 DOM implementation
libgtkmathview-bin - rendering engine for MathML documents
libgtkmathview-dev - rendering engine for MathML documents
libgtkmathview0c2a - rendering engine for MathML documents
liblua5.1-gnome-0 - GNOME bindings for the Lua language version 5.1
python-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
python-lxml-doc - pythonic binding for the libxml2 and libxslt libraries (documentation)
python-lxml - pythonic binding for the libxml2 and libxslt libraries
python3-lxml-dbg - pythonic binding for the libxml2 and libxslt libraries (debug extension)
python3-lxml - pythonic binding for the libxml2 and libxslt libraries
libcroco3-dev - a generic Cascading Style Sheet (CSS) parsing and manipulation toolkit
libcroco3 - a generic Cascading Style Sheet (CSS) parsing and manipulation toolkit
libxml++1.0-dev - A C++ interface to the GNOME XML library (libxml2)
libxml++1.0-doc - HTML interface documentation and examples for libxml++
libxml++1.0c2a - A C++ interface to the GNOME XML library (libxml2)
libxml++2.6-2 - A C++ interface to the GNOME XML library (libxml2)
libxml++2.6-dbg - A C++ interface to the GNOME XML library (debug symbols)
libxml++2.6-dev - A C++ interface to the GNOME XML library (libxml2)
libxml++2.6-doc - HTML interface documentation and examples for libxml++
libxml-dom-xpath-perl - adds XPath support to XML::DOM, using XML::XPathEngine
libxml-libxml-perl - Perl interface to the libxml2 library
libxml-rss-libxml-perl - create and update RSS files using XML::LibXML
libxml2-dbg - Debugging symbols for the GNOME XML library
libxml2-dev - Development files for the GNOME XML library
libxml2-doc - Documentation for the GNOME XML library
libxml2-utils - XML utilities
libxml2 - GNOME XML library
python-libxml2-dbg - Python bindings for the GNOME XML library (debug extension)
python-libxml2 - Python bindings for the GNOME XML library
nd - small command line interface to WebDAV servers
python-pyxmpp-doc - XMPP and Jabber implementation for Python (documentation)
python-pyxmpp - XMPP and Jabber implementation for Python
libsp-gxmlcpp-dev - S+P C++ wrapper for Gnome libxml2/libxslt
libsp-gxmlcpp1 - S+P C++ wrapper for Gnome libxml2/libxslt
# apt-get install libxml++2.6-2
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
libxml++2.6-2
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 5 个软件包未被升级。
需要下载 86.7 kB 的软件包。
解压缩后会消耗掉 254 kB 的额外空间。
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libxml++2.6-2 amd64 2.30.0-1 [86.7 kB]
下载 86.7 kB,耗时 0秒 (1,853 kB/s)
选中了曾被取消选择的软件包 libxml++2.6-2。
(正在读取数据库 ... 系统当前共安装有 147612 个文件和目录。)
正在解压缩 libxml++2.6-2 (从 .../libxml++2.6-2_2.30.0-1_amd64.deb) ...
正在设置 libxml++2.6-2 (2.30.0-1) ...
#
# apt-get install libxml++2.6-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libglib2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libxml2-dev
建议安装的软件包:
libglib2.0-doc libglibmm-2.4-doc libgtkmm-2.4-dev libsigc++-2.0-doc
libxml++2.6-doc
下列【新】软件包将被安装:
libglib2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libxml++2.6-dev
libxml2-dev
升级了 0 个软件包,新安装了 5 个软件包,要卸载 0 个软件包,有 5 个软件包未被升级。
需要下载 3,106 kB 的软件包。
解压缩后会消耗掉 15.3 MB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libglib2.0-dev amd64 2.24.2-1 [1,273 kB]
获取:2 http://mirror.ivic.org.cn/debian/ squeeze/main libsigc++-2.0-dev amd64 2.2.4.2-1 [113 kB]
获取:3 http://mirror.ivic.org.cn/debian/ squeeze/main libglibmm-2.4-dev amd64 2.24.2-1 [780 kB]
获取:4 http://mirror.ivic.org.cn/debian/ squeeze/main libxml2-dev amd64 2.7.8.dfsg-2 [830 kB]
获取:5 http://mirror.ivic.org.cn/debian/ squeeze/main libxml++2.6-dev amd64 2.30.0-1 [110 kB]
下载 3,106 kB,耗时 0秒 (16.2 MB/s)
选中了曾被取消选择的软件包 libglib2.0-dev。
(正在读取数据库 ... 系统当前共安装有 147621 个文件和目录。)
正在解压缩 libglib2.0-dev (从 .../libglib2.0-dev_2.24.2-1_amd64.deb) ...
选中了曾被取消选择的软件包 libsigc++-2.0-dev。
正在解压缩 libsigc++-2.0-dev (从 .../libsigc++-2.0-dev_2.2.4.2-1_amd64.deb) ...
选中了曾被取消选择的软件包 libglibmm-2.4-dev。
正在解压缩 libglibmm-2.4-dev (从 .../libglibmm-2.4-dev_2.24.2-1_amd64.deb) ...
选中了曾被取消选择的软件包 libxml2-dev。
正在解压缩 libxml2-dev (从 .../libxml2-dev_2.7.8.dfsg-2_amd64.deb) ...
选中了曾被取消选择的软件包 libxml++2.6-dev。
正在解压缩 libxml++2.6-dev (从 .../libxml++2.6-dev_2.30.0-1_amd64.deb) ...
正在处理用于 man-db 的触发器...
正在设置 libglib2.0-dev (2.24.2-1) ...
正在设置 libsigc++-2.0-dev (2.2.4.2-1) ...
正在设置 libglibmm-2.4-dev (2.24.2-1) ...
正在设置 libxml2-dev (2.7.8.dfsg-2) ...
正在设置 libxml++2.6-dev (2.30.0-1) ...
#
checking libxml2 xml2-config >= 2.6.0 ... configure: error: Could not find libxml2 anywhere (see config.log for details).
# apt-get install libxml++2.6-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libglib2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libxml2-dev pkg-config
Suggested packages:
libglib2.0-doc libglibmm-2.4-doc libgtkmm-2.4-dev libsigc++-2.0-doc
libxml++2.6-doc
The following NEW packages will be installed:
libglib2.0-dev libglibmm-2.4-dev libsigc++-2.0-dev libxml++2.6-dev libxml2-dev
pkg-config
0 upgraded, 6 newly installed, 0 to remove and 2 not upgraded.
Need to get 3,166 kB of archives.
After this operation, 15.4 MB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirror.ivic.org.cn/debian/ squeeze/main pkg-config amd64 0.25-1.1 [59.2 kB]
Get:2 http://mirror.ivic.org.cn/debian/ squeeze/main libglib2.0-dev amd64 2.24.2-1 [1,273 kB]
Get:3 http://mirror.ivic.org.cn/debian/ squeeze/main libsigc++-2.0-dev amd64 2.2.4.2-1 [113 kB]
Get:4 http://mirror.ivic.org.cn/debian/ squeeze/main libglibmm-2.4-dev amd64 2.24.2-1 [780 kB]
Get:5 http://mirror.ivic.org.cn/debian/ squeeze/main libxml2-dev amd64 2.7.8.dfsg-2 [830 kB]
Get:6 http://mirror.ivic.org.cn/debian/ squeeze/main libxml++2.6-dev amd64 2.30.0-1 [110 kB]
Fetched 3,166 kB in 0s (22.4 MB/s)
Selecting previously deselected package pkg-config.
(Reading database ... 42977 files and directories currently installed.)
Unpacking pkg-config (from .../pkg-config_0.25-1.1_amd64.deb) ...
Selecting previously deselected package libglib2.0-dev.
Unpacking libglib2.0-dev (from .../libglib2.0-dev_2.24.2-1_amd64.deb) ...
Selecting previously deselected package libsigc++-2.0-dev.
Unpacking libsigc++-2.0-dev (from .../libsigc++-2.0-dev_2.2.4.2-1_amd64.deb) ...
Selecting previously deselected package libglibmm-2.4-dev.
Unpacking libglibmm-2.4-dev (from .../libglibmm-2.4-dev_2.24.2-1_amd64.deb) ...
Selecting previously deselected package libxml2-dev.
Unpacking libxml2-dev (from .../libxml2-dev_2.7.8.dfsg-2_amd64.deb) ...
Selecting previously deselected package libxml++2.6-dev.
Unpacking libxml++2.6-dev (from .../libxml++2.6-dev_2.30.0-1_amd64.deb) ...
Processing triggers for man-db ...
Setting up pkg-config (0.25-1.1) ...
Setting up libglib2.0-dev (2.24.2-1) ...
Setting up libsigc++-2.0-dev (2.2.4.2-1) ...
Setting up libglibmm-2.4-dev (2.24.2-1) ...
Setting up libxml2-dev (2.7.8.dfsg-2) ...
Setting up libxml++2.6-dev (2.30.0-1) ...
root@shahe26:~/libvirt-0.9.0#
#./configure
....
configure: error: You must install the GnuTLS library in order to compile and run libvirt
#
# apt-get install gnutls-bin(可省)
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
gnutls-bin
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 5 个软件包未被升级。
需要下载 333 kB 的软件包。
解压缩后会消耗掉 631 kB 的额外空间。
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main gnutls-bin amd64 2.8.6-1 [333 kB]
下载 333 kB,耗时 0秒 (6,967 kB/s)
选中了曾被取消选择的软件包 gnutls-bin。
(正在读取数据库 ... 系统当前共安装有 148297 个文件和目录。)
正在解压缩 gnutls-bin (从 .../gnutls-bin_2.8.6-1_amd64.deb) ...
正在处理用于 man-db 的触发器...
正在设置 gnutls-bin (2.8.6-1) ...
#
# apt-get install libgnutls-dev
root@shahe26:~/libvirt-0.9.0# apt-get install libgnutls-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libgcrypt11-dev libgpg-error-dev libtasn1-3-dev
Suggested packages:
libgcrypt11-doc gnutls-doc guile-gnutls
The following NEW packages will be installed:
libgcrypt11-dev libgnutls-dev libgpg-error-dev libtasn1-3-dev
0 upgraded, 4 newly installed, 0 to remove and 2 not upgraded.
Need to get 1,435 kB of archives.
After this operation, 3,969 kB of additional disk space will be used.
Do you want to continue [Y/n]? y
Get:1 http://mirror.ivic.org.cn/debian/ squeeze/main libgpg-error-dev amd64 1.6-1 [36.3 kB]
Get:2 http://mirror.ivic.org.cn/debian/ squeeze/main libgcrypt11-dev amd64 1.4.5-2 [376 kB]
Get:3 http://mirror.ivic.org.cn/debian/ squeeze/main libtasn1-3-dev amd64 2.7-1 [386 kB]
Get:4 http://mirror.ivic.org.cn/debian/ squeeze/main libgnutls-dev amd64 2.8.6-1 [637 kB]
Fetched 1,435 kB in 0s (21.6 MB/s)
Selecting previously deselected package libgpg-error-dev.
(Reading database ... 43686 files and directories currently installed.)
Unpacking libgpg-error-dev (from .../libgpg-error-dev_1.6-1_amd64.deb) ...
Selecting previously deselected package libgcrypt11-dev.
Unpacking libgcrypt11-dev (from .../libgcrypt11-dev_1.4.5-2_amd64.deb) ...
Selecting previously deselected package libtasn1-3-dev.
Unpacking libtasn1-3-dev (from .../libtasn1-3-dev_2.7-1_amd64.deb) ...
Selecting previously deselected package libgnutls-dev.
Unpacking libgnutls-dev (from .../libgnutls-dev_2.8.6-1_amd64.deb) ...
Processing triggers for man-db ...
Processing triggers for install-info ...
Setting up libgpg-error-dev (1.6-1) ...
Setting up libgcrypt11-dev (1.4.5-2) ...
Setting up libtasn1-3-dev (2.7-1) ...
Setting up libgnutls-dev (2.8.6-1) ...
#./configure
...
configure: error: You must install device-mapper-devel/libdevmapper >= 1.0.0 to compile libvirt
# apt-get install libdevmapper-dev libdevmapper
root@Optiplex-780:/home/qinguan/桌面/libvirt-0.9.0# apt-get install libdevmapper-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libselinux1-dev libsepol1-dev
下列【新】软件包将被安装:
libdevmapper-dev libselinux1-dev libsepol1-dev
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 5 个软件包未被升级。
需要下载 930 kB 的软件包。
解压缩后会消耗掉 4,571 kB 的额外空间。
您希望继续执行吗?[Y/n]y
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libsepol1-dev amd64 2.0.41-1 [578 kB]
获取:2 http://mirror.ivic.org.cn/debian/ squeeze/main libselinux1-dev amd64 2.0.96-1 [320 kB]
获取:3 http://mirror.ivic.org.cn/debian/ squeeze/main libdevmapper-dev amd64 2:1.02.48-5 [32.6 kB]
下载 930 kB,耗时 0秒 (7,633 kB/s)
选中了曾被取消选择的软件包 libsepol1-dev。
(正在读取数据库 ... 系统当前共安装有 148437 个文件和目录。)
正在解压缩 libsepol1-dev (从 .../libsepol1-dev_2.0.41-1_amd64.deb) ...
选中了曾被取消选择的软件包 libselinux1-dev。
正在解压缩 libselinux1-dev (从 .../libselinux1-dev_2.0.96-1_amd64.deb) ...
选中了曾被取消选择的软件包 libdevmapper-dev。
正在解压缩 libdevmapper-dev (从 .../libdevmapper-dev_2%3a1.02.48-5_amd64.deb) ...
正在处理用于 man-db 的触发器...
正在设置 libsepol1-dev (2.0.41-1) ...
正在设置 libselinux1-dev (2.0.96-1) ...
正在设置 libdevmapper-dev (2:1.02.48-5) ...
# .configure
...
configure: error: libnl-devel >= 1.1 is required for macvtap support
# apt-get install libnl-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
libnl-doc
The following NEW packages will be installed:
libnl-dev
0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.
Need to get 33.7 kB of archives.
After this operation, 262 kB of additional disk space will be used.
Get:1 http://mirror.ivic.org.cn/debian/ squeeze/main libnl-dev amd64 1.1-6 [33.7 kB]
Fetched 33.7 kB in 0s (0 B/s)
Selecting previously deselected package libnl-dev.
(Reading database ... 44026 files and directories currently installed.)
Unpacking libnl-dev (from .../libnl-dev_1.1-6_amd64.deb) ...
Setting up libnl-dev (1.1-6) ...
checking for HAL... no
configure: error: You must install hal-devel >= 0.5.0 to compile libvirt
# apt-cache search hal-dev
gnome-device-manager - GNOME device manager based on HAL
libgnome-device-manager-dev - GNOME device manager based on HAL - development files
libgnome-device-manager0 - GNOME device manager based on HAL - libraries
libhal-dev - Hardware Abstraction Layer - development files
# apt-get install libhal-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会安装下列额外的软件包:
libdbus-1-dev
建议安装的软件包:
hal-doc
下列【新】软件包将被安装:
libdbus-1-dev libhal-dev
升级了 0 个软件包,新安装了 2 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
需要下载 347 kB 的软件包。
解压缩后会消耗掉 1,352 kB 的额外空间。
您希望继续执行吗?[Y/n]
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libdbus-1-dev amd64 1.2.24-4 [244 kB]
获取:2 http://mirror.ivic.org.cn/debian/ squeeze/main libhal-dev amd64 0.5.14-3 [103 kB]
下载 347 kB,耗时 0秒 (3,208 kB/s)
选中了曾被取消选择的软件包 libdbus-1-dev。
(正在读取数据库 ... 系统当前共安装有 149814 个文件和目录。)
正在解压缩 libdbus-1-dev (从 .../libdbus-1-dev_1.2.24-4_amd64.deb) ...
选中了曾被取消选择的软件包 libhal-dev。
正在解压缩 libhal-dev (从 .../libhal-dev_0.5.14-3_amd64.deb) ...
正在设置 libdbus-1-dev (1.2.24-4) ...
正在设置 libhal-dev (0.5.14-3) ...
# ./configure --prefix=/usr --libdir=/usr/lib64 --localstatedir=/var --sysconfdir=/etc --with-hal=yes --with-udev=yes
checking for UDEV... no
configure: error: You must install libudev-devel >= 145 to compile libvirt
# apt-cache search libudev-dev
libudev-dev - libudev development files
# apt-get install libudev-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
libudev-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
需要下载 53.6 kB 的软件包。
解压缩后会消耗掉 418 kB 的额外空间。
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libudev-dev amd64 164-3 [53.6 kB]
下载 53.6 kB,耗时 0秒 (1,136 kB/s)
选中了曾被取消选择的软件包 libudev-dev。
(正在读取数据库 ... 系统当前共安装有 149853 个文件和目录。)
正在解压缩 libudev-dev (从 .../libudev-dev_164-3_amd64.deb) ...
正在设置 libudev-dev (164-3) ...
# ./configure --prefix=/usr --libdir=/usr/lib64 --localstatedir=/var --sysconfdir=/etc --with-hal=yes --with-udev=yes
....
checking for PCIACCESS... no
configure: error: You must install libpciaccess-devel >= 0.10.0 to compile libvirt
# apt-cache search libpciaccess-dev
libpciaccess-dev - Generic PCI access library for X - development files
# apt-get install libpciaccess-dev
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列【新】软件包将被安装:
libpciaccess-dev
升级了 0 个软件包,新安装了 1 个软件包,要卸载 0 个软件包,有 4 个软件包未被升级。
需要下载 42.8 kB 的软件包。
解压缩后会消耗掉 147 kB 的额外空间。
获取:1 http://mirror.ivic.org.cn/debian/ squeeze/main libpciaccess-dev amd64 0.12.0-1 [42.8 kB]
下载 42.8 kB,耗时 0秒 (2,051 kB/s)
选中了曾被取消选择的软件包 libpciaccess-dev。
(正在读取数据库 ... 系统当前共安装有 149877 个文件和目录。)
正在解压缩 libpciaccess-dev (从 .../libpciaccess-dev_0.12.0-1_amd64.deb) ...
正在设置 libpciaccess-dev (0.12.0-1) ...
#
#make
#make install
注:有时依然不能用virsh nodedev-dumpxml pci_0000_00_19_0
#./configure --prefix=/usr --libdir=/usr/lib64 --localstatedir=/var --sysconfdir=/etc --with-hal=yes --with-udev=yes --with-polkit=yes
....
checking for POLKIT... no
configure: error: You must install PolicyKit >= 0.6 to compile libvirt
# apt-get install libpolkit-agent-1-0 libpolkit-backend-1-0 libpolkit-gobject-1-0 libpolkit-gtk-1-0