2011-12-25 9 views
17

私は、Linuxサーバ上でソースコードからtwistedをLinuxにインストールしようとしました。私はそのマシン上でroot権限を持っていない、ところでLinuxでツイストインストールに失敗しました

twisted/runner/portmap.c:10:20: error: Python.h: No such file or directory 
twisted/runner/portmap.c:14: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
twisted/runner/portmap.c:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
twisted/runner/portmap.c:45: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PortmapMethods’ 
twisted/runner/portmap.c: In function ‘initportmap’: 
twisted/runner/portmap.c:55: warning: implicit declaration of function ‘Py_InitModule’ 
twisted/runner/portmap.c:55: error: ‘PortmapMethods’ undeclared (first use in this function) 
twisted/runner/portmap.c:55: error: (Each undeclared identifier is reported only once 
twisted/runner/portmap.c:55: error: for each function it appears in.) 
error: command 'gcc' failed with exit status 1 

、およびPython/usr/bin

を、私の ホームフォルダにインストールされていません。私は、このコマンド setup.py installを使用 は、それが以下のエラーメッセージで失敗しました
+0

[ubuntu:私はpythonを持っていますが、gcc cantはPython.hを見つける](http://stackoverflow.com/questions/8282231/ubuntu-i-have-python-but-gcc-cant-find- python-h) –

答えて

41

コンパイラは、Python開発ヘッダーを見つけることができません。 CentOSの場合はpython-develをインストールするか、python-devをDebian、Ubuntuおよびその派生物にインストールするようにシステム管理者に依頼してください。それが助けになるはずです。

+0

python3を使うなら 'python3-dev' –

関連する問題