Libvirt installation in CentOS6 source code
Libvirt is a free and open-source C function library that supports mainstream virtualization tools in Linux. It aims to provide a convenient and reliable programming interface for various virtualization tools, including Xen, C ++, Ruby, Python, and other mainstream development languages.
Currently, the default virtualization management tools virt-manager (graphical) and virt-install (command line mode) on mainstream Linux platforms are developed based on libvirt, the following describes the problems and solutions for installing libvirt in CentOS.
Q1:
When You execute./configure, the following error occurs: You must install the libyajl library & headers to compile libvirt.
The system prompts that the libyajl library is missing and belongs to the JSON library.
When rpm was first used to install the library, an error occurred. Instead, the libyajl library was installed with the source code, which was hosted on github.
Installation Method: git clone git: // github.com/loyd/yajl
Cd yajl
./Configure
Make
Make install
Q2:
Note that when adding the parameter./configure:./configure-prefix =/usr-localstatedir =/var-sysconfdir =/etc
When you execute make install, an error occurs, which means that it is in conflict with the previous one and can be overwritten after the specified directory is specified.
Q3:
After the installation is complete, execute virsh or libcmdd:
While loading shared libraries: libXXX. so. x: cannot open shared object file: No such file or directory. The location of the shared link library is not found,
Modify/etc/ld. so. conf and add the specified path. For example, if usr is specified, the. so file is under/usr/local/lib.
Run ldconfig to make the configuration file take effect.
Official Website: At this point you may have to run ldconfig or a similar utility to update your list of installed shared libs.
Ldconfig:
It is a program, usually located under/sbin, which is used by the root user. The specific function and usage can be found in man ldconfig. Its function is to set/etc/ld. so. the library files in the path listed in conf are cached to/etc/ld. so. cache for use
This article permanently updates the link address: