2013-04-19 2 views
0

Чтобы установить urwid 1.1.1 на CentOS 6.4 я уже пробовал:Как установить urwid 1.1.1 на CentOS 6.4?

yum install python-urwid 

, который устанавливает urwid 0.9.9.

Затем я вручную скачал urwid 1.1.1 и запустить:

cd /mnt/hgfs/Shared/urwid-1.1.1 
python ./setup.py install 

как online manual говорит.

Это приводит к следующей ошибке:

[[email protected] ~]# cd /mnt/hgfs/Shared/urwid-1.1.1 
[[email protected] urwid-1.1.1]# python ./setup.py install 
running install 
running build 
running build_py 
running build_ext 
building 'urwid.str_util' extension 
gcc -pthread -fno-strict-aliasing -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -DNDEBUG -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -D_GNU_SOURCE -fPIC -fwrapv -fPIC -I/usr/include/python2.6 -c source/str_util.c -o build/temp.linux-x86_64-2.6/source/str_util.o 
source/str_util.c:25:20: error: Python.h: No such file or directory 
source/str_util.c:88: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:100: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:121: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:169: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:190: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c:191: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c:191: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c: In function ‘Py_DecodeOne’: 
source/str_util.c:195: error: ‘pos’ undeclared (first use in this function) 
source/str_util.c:195: error: (Each undeclared identifier is reported only once 
source/str_util.c:195: error: for each function it appears in.) 
source/str_util.c:197: error: ‘ret’ undeclared (first use in this function) 
source/str_util.c:202: error: ‘text_len’ undeclared (first use in this function) 
source/str_util.c: At top level: 
source/str_util.c:319: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:351: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c:352: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c:352: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c: In function ‘Py_DecodeOneRight’: 
source/str_util.c:354: error: ‘Py_ssize_t’ undeclared (first use in this function) 
source/str_util.c:354: error: expected ‘;’ before ‘subret’ 
source/str_util.c:356: error: ‘pos’ undeclared (first use in this function) 
source/str_util.c:360: error: ‘text_len’ undeclared (first use in this function) 
source/str_util.c:360: error: ‘subret’ undeclared (first use in this function) 
source/str_util.c:360: error: too many arguments to function ‘Py_DecodeOne’ 
source/str_util.c:361: error: ‘ret’ undeclared (first use in this function) 
source/str_util.c: At top level: 
source/str_util.c:377: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:413: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c:414: error: expected declaration specifiers or ‘...’ before ‘Py_ssize_t’ 
source/str_util.c: In function ‘Py_WithinDoubleByte’: 
source/str_util.c:416: error: ‘Py_ssize_t’ undeclared (first use in this function) 
source/str_util.c:416: error: expected ‘;’ before ‘i’ 
source/str_util.c:418: error: ‘pos’ undeclared (first use in this function) 
source/str_util.c:421: error: ‘line_start’ undeclared (first use in this function) 
source/str_util.c:425: error: too many arguments to function ‘Py_WithinDoubleByte’ 
source/str_util.c:432: error: ‘i’ undeclared (first use in this function) 
source/str_util.c: At top level: 
source/str_util.c:440: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:476: error: expected ‘)’ before ‘*’ token 
source/str_util.c:519: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:546: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Py_MovePrevChar’ 
source/str_util.c:576: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:599: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Py_MoveNextChar’ 
source/str_util.c:630: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:653: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Py_CalcWidth’ 
source/str_util.c:708: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:739: error: expected ‘)’ before ‘*’ token 
source/str_util.c:835: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 
source/str_util.c:855: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘Str_UtilMethods’ 
source/str_util.c:874: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘initstr_util’ 
source/str_util.c: In function ‘main’: 
source/str_util.c:882: warning: implicit declaration of function ‘Py_SetProgramName’ 
source/str_util.c:885: warning: implicit declaration of function ‘Py_Initialize’ 
source/str_util.c:888: warning: implicit declaration of function ‘initstr_util’ 
error: command 'gcc' failed with exit status 1 
[[email protected] urwid-1.1.1]# 

Python 2.6 и GCC 4.4.7 в настоящее время устанавливаются.

Может ли кто-нибудь объяснить ошибку и предложить решение?

Спасибо!

ответ

1

yum install python-devel должен решить вашу проблему, поскольку то, чего вам не хватает, это заголовочный файл Python.h C, необходимый для компиляции.

Смежные вопросы