当前位置: 首页 > 工具软件 > Libvirt > 使用案例 >

python-libvirt的安装

阴飞星
2023-12-01

使用的sdk Python-libvirt

libvirt安装

  • 报错
  Running setup.py install for libvirt-python ... error
    Complete output from command /usr/local/python3/bin/python3.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-p_unllvd/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-record-05z6vdk6/install-record.txt --single-version-externally-managed --compile:
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    running install
    running build
    /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
    Package libvirt was not found in the pkg-config search path.
    Perhaps you should add the directory containing `libvirt.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'libvirt' found
    error: command '/usr/bin/pkg-config' failed with exit status 1

  • 安装解决
yum install -y libvirt-devel
python3 setup.py  build
python3 setup.py install
 类似资料: