错误:包:python-devel-2.6.6-64.el6.x86_64需要:找到python-libs(x86-64)= 2.6.6-64.el6:python-libs-2.6.6-66.el6_8.x86_64

时间:2017-11-13 18:36:26

标签: python linux bash rhel

我在运行python setup.py时遇到此错误,无法安装cffi python模块。

c/cffi1_module.c: At top level:
c/cffi1_module.c:128: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
c/cffi1_module.c:150: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
c/_cffi_backend.c:6691: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘init_cffi_backend’
error: command 'gcc' failed with exit status 1
error: command 'gcc' failed with exit status 1, 

So this error on googling shows that I need to install python devel and on doing that I get the error below:

Error: Package: python-devel-2.6.6-64.el6.x86_64 (rhel-6-server-rpms)
           Requires: python-libs(x86-64) = 2.6.6-64.el6
           Installed: python-libs-2.6.6-66.el6_8.x86_64 (@rhel6-patch-channel-may2015)
               python-libs(x86-64) = 2.6.6-66.el6_8

根据错误 - 要求:python-libs(x86-64)= 2.6.6-64.el6但安装了is-python-libs(x86-64)= 2.6.6-66.el6_8,那怎么能我改变了吗?

1 个答案:

答案 0 :(得分:1)

您的rhel-6-server-rpms频道不是官方版本。当前rhel-6-server-rpms通道内容实际上具有2.6.6-66.el6_8.x86_64版本的Python,因此问题不会发生。您需要查看yum repolist -v输出并仔细检查您是否正在使用官方存储库。 (您需要一个活跃的Red Hat Enterprise Linux订阅才能访问这些存储库。)