我在安装libvirt-python时基本上把常见的坑都遇到了,于是在这里记录一下。
环境:
CentOS7
Python3.6
安装前先把坑填好:
yum install -y pkgconfig libvirt libvirt-devel gcc python3-devel
然后安装即可
pip3 install libvirt-python
已知可解决如下报错:
libvirt-override.c:21:20: 致命错误:Python.h:没有那个文件或目录
unable to execute 'gcc': No such file or directory
No package 'libvirt' found