2011-12-25 10 views
17

Próbowałem zainstalować skręconą wersję systemu Linux z kodu źródłowego na moim serwerze Linux. Kiedy używać tego polecenia setup.py install, że nie powiodła się z komunikatem o błędzie poniżej:Instalacja skręcona nie powiodła się w systemie 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 

BTW, nie mam uprawnień administratora na tym komputerze, a Python jest zainstalowany w moim domu folderze nie /usr/bin

+0

możliwy duplikat [ubuntu: Mam pythona, ale gcc nie może znaleźć Python.h] (http://stackoverflow.com/questions/8282231/ubuntu-i-have-python-but-gcc-cant-find- python-h) –

Odpowiedz

41

Kompilator nie może znaleźć nagłówków programistycznych Pythona. Wezwanie administratora systemu do instalacji python-devel w przypadku CentOS lub do instalacji python-dev na Debianie, Ubuntu i ich pochodnych. To powinno pomóc.

+0

'python3-dev' jeśli używasz python3 –

Powiązane problemy