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

libvirt源代码安装

2016-02-22 10:43 274 查看

官网下载源代码

http://libvirt.org/downloads.html

编译安装

http://libvirt.org/compiling.html

Configure Error

Error: checking libxml2 xml2-config >= 2.6.0 … configure: error: Could not find libxml2 anywhere

显示libxml2 未安装。

apt-cache search libxml2 查找安装包

apt-get install libxml2 libxml2-dev

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

apt-get install libdevmapper1.02.1 libdevmapper-dev

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

apt-get install libnl-dev

安装完libnl-dev后还是报同样的错误,安装pkg-config 修改一下以安装的libnl-devel的版本

apt-get install pkg-config

pkg-config –modversion libnl-1

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

apt-get install libpciaccess0 libpciaccess-dev

编译安装

make

make install

Error: virsh: error while loading shared libraries: libvirt.so.0: cannot open shared object file: No such file or directory

有一种可能就是系统第一次在/usr/local下手动编译安装程序,执行ldconfig命令更新动态链接库缓存

又出现不一样的错

error: Failed to reconnect to the hypervisor

error: no valid connection

error: Failed to connect socket to ‘/usr/local/var/run/libvirt/libvirt-sock’: No such file or directory

这是由于libvirtd未启动

libvirtd -d

至此,全部正确运行

virsh list

virsh version

参考:

http://liuzhijun.iteye.com/blog/1728617
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  libvirt 源码安装