在Centos7上安装Python-dev

来源:互联网 发布:死亡预告 知乎 编辑:程序博客网 时间:2024/06/10 19:24

在安装audiotoolsmake install出现问题

running build_extbuilding 'audiotools.pcm' extensioncreating build/temp.linux-x86_64-2.7creating build/temp.linux-x86_64-2.7/srcgcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.7 -c src/pcm.c -o build/temp.linux-x86_64-2.7/src/pcm.osrc/pcm.c:2:20: 致命错误:Python.h:没有那个文件或目录 #include <Python.h>                    ^编译中断。error: command 'gcc' failed with exit status 1make: *** [install] 错误 1

因为缺少Python.h

解决

安装Python-dev,但是在centos上面没有该包

[root@master audiotools-3.0]# yum install python-dev已加载插件:fastestmirrorLoading mirror speeds from cached hostfile * base: mirrors.163.com * extras: centos.ustc.edu.cn * updates: mirrors.163.com没有可用软件包 python-dev。

因为该centos上面Python-devPython-devel

原创粉丝点击