在Centos7上安裝Python-dev

在安裝audiotoolsmake install出現問題

running build_ext
building 'audiotools.pcm' extension
creating build/temp.linux-x86_64-2.7
creating build/temp.linux-x86_64-2.7/src
gcc -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.o
src/pcm.c:2:20: 致命錯誤:Python.h:沒有那個文件或目錄
 #include <Python.h>
                    ^
編譯中斷。
error: command 'gcc' failed with exit status 1
make: *** [install] 錯誤 1

因爲缺少Python.h

解決

安裝Python-dev,但是在centos上面沒有該包

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

因爲該centos上面Python-devPython-devel

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章