【问题标题】:Failed building wheel for libvirt-python CentOSlibvirt-python CentOS 的构建轮子失败
【发布时间】:2022-01-07 00:15:02
【问题描述】:

我正在运行 CentOS 并尝试安装 openstack。 如果我安装 libvirt-python,它将安装最新版本,例如

pip install --user libvirt-python
Collecting libvirt-python
Installing collected packages: libvirt-python
Successfully installed libvirt-python-4.10.0

但是,upper_constraints.txt(在运行时动态更新,不确定在哪里设置)列出 libvirt-python===3.10.0

如果我卸载 libvirt-python 并尝试安装 3.10.0,我会得到一个轮子错误(见下文)。谁能帮我解决这个问题?

    pip install --user libvirt-python==3.10.0
    Collecting libvirt-python==3.10.0
    Using cached 
https://files.pythonhosted.org/packages/20/b3/d7e226a07efa1432a4dcf92b3baa0cf554241a7eecd8a654c23c2119b190/libvirt-python-3.10.0.tar.gz
Building wheels for collected packages: libvirt-python
  Running setup.py bdist_wheel for libvirt-python ... error
  Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Ry0ikH/libvirt-python/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-GwcOJA --python-tag cp27:
  running bdist_wheel
  running build
  /usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
  /usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
  Found 446 functions in /usr/share/libvirt/api/libvirt-api.xml
  Found 0 functions in libvirt-override-api.xml
  Generated 355 wrapper functions
  Missing type converters:
  virNWFilterBindingPtr:8
  virTypedParameterPtr *:2
  virNWFilterBindingPtr **:1
  char **:1
  ERROR: failed virConnectBaselineHypervisorCPU
  ERROR: failed virConnectListAllNWFilterBindings
  ERROR: failed virDomainGetLaunchSecurityInfo
  ERROR: failed virNWFilterBindingCreateXML
  ERROR: failed virNWFilterBindingDelete
  ERROR: failed virNWFilterBindingFree
  ERROR: failed virNWFilterBindingGetFilterName
  ERROR: failed virNWFilterBindingGetPortDev
  ERROR: failed virNWFilterBindingGetXMLDesc
  ERROR: failed virNWFilterBindingLookupByPortDev
  ERROR: failed virNWFilterBindingRef
  ERROR: failed virNodeGetSEVInfo
  error: command '/usr/bin/python' failed with exit status 1

Failed building wheel for libvirt-python
  Running setup.py clean for libvirt-python
Failed to build libvirt-python
Installing collected packages: libvirt-python
  Running setup.py install for libvirt-python ... error
    Complete output from command /usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Ry0ikH/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-7u_zLd/install-record.txt --single-version-externally-managed --compile --user --prefix=:
running install
running build
/usr/bin/pkg-config --print-errors --atleast-version=0.9.11 libvirt
/usr/bin/python generator.py libvirt /usr/share/libvirt/api/libvirt-api.xml
Found 446 functions in /usr/share/libvirt/api/libvirt-api.xml
Found 0 functions in libvirt-override-api.xml
Generated 355 wrapper functions
Missing type converters:
virNWFilterBindingPtr:8
virTypedParameterPtr *:2
virNWFilterBindingPtr **:1
char **:1
ERROR: failed virConnectBaselineHypervisorCPU
ERROR: failed virConnectListAllNWFilterBindings
ERROR: failed virDomainGetLaunchSecurityInfo
ERROR: failed virNWFilterBindingCreateXML
ERROR: failed virNWFilterBindingDelete
ERROR: failed virNWFilterBindingFree
ERROR: failed virNWFilterBindingGetFilterName
ERROR: failed virNWFilterBindingGetPortDev
ERROR: failed virNWFilterBindingGetXMLDesc
ERROR: failed virNWFilterBindingLookupByPortDev
ERROR: failed virNWFilterBindingRef
ERROR: failed virNodeGetSEVInfo
error: command '/usr/bin/python' failed with exit status 1

----------------------------------------
Command "/usr/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-Ry0ikH/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-7u_zLd/install-record.txt --single-version-externally-managed --compile --user --prefix=" failed with error code 1 in /tmp/pip-install-Ry0ikH/libvirt-python/

【问题讨论】:

    标签: python pip centos openstack devstack


    【解决方案1】:

    找到两个upper_constraints 文件。一个是在 python 站点包中。更新了 libvirt-python 并修复了它(或者至少让我进入下一个安装错误!)

    【讨论】:

      【解决方案2】:

      需要安装开发工具

      使用:apt-get install libvirt-dev 安装开发工具,然后 t

      【讨论】:

      • 您的答案可以通过额外的支持信息得到改进。请edit 添加更多详细信息,例如引用或文档,以便其他人可以确认您的答案是正确的。你可以找到更多关于如何写好答案的信息in the help center
      猜你喜欢
      • 2020-12-28
      • 2017-09-11
      • 2016-11-14
      • 2022-01-10
      • 2019-12-07
      • 2020-06-11
      • 2018-01-07
      • 2017-03-17
      • 2020-11-09
      相关资源
      最近更新 更多