新安装的centos7,yum也update了,许多插件都安装了。可是在安装twisted时出现了:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -u -c 'import sys, ……………………
当然,最后结尾还不忘记给你来个:
src/twisted/test/raiser.c:4:20: 致命错误:Python.h:没有那个文件或目录
#include "Python.h"
^
编译中断。
error: command 'gcc' failed with exit status 1
在网上找了许多办法,所有的回答都是 你没有安装 python-devel。 敲入命令 yum install python-devel,可是问题依旧。
抓狂中。想想,应该还是少了 gcc 之类的插件。在网上不断收集,收集之后的命令如下:
yum -y install gcc python36-devel bzip2-devel sqlite-devel openssl-devel readline-devel xz-devel xz-devel tk-devel gdbm-devel
一口气运行完毕之后,安装了一大堆插件。之后再次安装twisted。安装成功!
先记录下来。以免以后忘记。