原创

error: Setup script exited with error: command 'gcc' failed with exit status 1

代码设计工具ReviewBoard安装Python模块出现error: Setup script exited with error: command 'gcc' failed with exit status 1,但是明明已经安装了gcc组件还是无法运行,后来发现是failed不是not found,这说明错误和gcc没多大关系应该是缺少某些功能模块,先后安装了一些列插件python-devel,libffi-devel等还是不行,最后发现要安装openssl-devel才行。

执行easy_install ReviewBoard 命令,具体错误信息如下:

[root@localhost Django-1.5.5]# easy_install ReviewBoard 

Searching for ReviewBoard

Best match: ReviewBoard 1.6

...

Moving pyasn1-0.2.3-py2.6.egg to /usr/lib/python2.6/site-packages

Adding pyasn1 0.2.3 to easy-install.pth file

...

removing: _configtest.c _configtest.o

c/_cffi_backend.c:15:17: error: ffi.h: No such file or directory

In file included from c/_cffi_backend.c:63:

c/malloc_closure.h:81: error: expected specifier-qualifier-list before ?.fi_closure?

...

In file included from c/cffi1_module.c:3,

                 from c/_cffi_backend.c:6740:

c/realize_c_type.c: In function ?.ealize_c_type_or_func?.

c/realize_c_type.c:577: error: ?.FI_DEFAULT_ABI?.undeclared (first use in this function)

c/_cffi_backend.c: In function ?.nit_cffi_backend?.

c/_cffi_backend.c:6832: error: ?.FI_DEFAULT_ABI?.undeclared (first use in this function)

error: Setup script exited with error: command 'gcc' failed with exit status 1

解决方案:

执行yum install gcc libffi-devel python-devel openssl-devel命令,具体命令如下:

[root@localhost Django-1.5.5]# yum install gcc libffi-devel python-devel openssl-devel

Loaded plugins: fastestmirror, refresh-packagekit, security

Loading mirror speeds from cached hostfile

 * base: mirrors.tuna.tsinghua.edu.cn

 * extras: mirrors.tuna.tsinghua.edu.cn

 * updates: mirrors.tuna.tsinghua.edu.cn

Setting up Install Process

Package gcc-4.4.7-17.el6.x86_64 already installed and latest version

Package python-devel-2.6.6-66.el6_8.x86_64 already installed and latest version

Package openssl-devel-1.0.1e-48.el6_8.4.x86_64 already installed and latest version

Resolving Dependencies

--> Running transaction check

---> Package libffi-devel.x86_64 0:3.0.5-3.2.el6 will be installed

--> Finished Dependency Resolution

安装ReviewBoard时错误解决方案推荐:

http://blog.yoodb.com/yoodb/article/detail/1270

http://blog.yoodb.com/yoodb/article/detail/1267

~阅读全文~人机检测~

关注下方微信公众号“Java精选”(w_z90110),回复关键词领取资料:如Mysql、Hadoop、Dubbo、Spring Boot等,免费领取视频教程、资料文档和项目源码。

Java精选专注程序员推送一些Java开发知识,包括基础知识、各大流行框架(Mybatis、Spring、Spring Boot等)、大数据技术(Storm、Hadoop、MapReduce、Spark等)、数据库(Mysql、Oracle、NoSQL等)、算法与数据结构、面试专题、面试技巧经验、职业规划以及优质开源项目等。其中一部分由小编总结整理,另一部分来源于网络上优质资源,希望对大家的学习和工作有所帮助。

评论

分享:

支付宝

微信