2014-10-09 206 views
0

(ENV)[根@ RISERVER Audiotube]#PIP從上述命令我得到以下錯誤安裝mysql-蟒在CentOS 6.4

...

_mysql.c:2760: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ConnectionObject_Type’ 

_mysql.c:2848: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_ResultObject_Type’ 

_mysql.c:2938: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘_mysql_methods’ 

_mysql.c:3010: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token 

_mysql.c:3058: warning: return type defaults to ‘int’ 

_mysql.c: In function ‘DL_EXPORT’: 

_mysql.c:3058: error: expected declaration specifiers before ‘init_mysql’ 

_mysql.c:3166: error: expected ‘{’ at end of input 

error: command 'gcc' failed with exit status 1 

---------------------------------------- 
Cleaning up... 
Command /mnt/external/project/audiotube/project/env/bin/python -c "import setuptools, tokenize;__file__='/mnt/external/project/audiotube/project/env/build/mysql-python/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-MO14TZ-record/install-record.txt --single-version-externally-managed --compile --install-headers /mnt/external/project/audiotube/project/env/include/site/python2.6 failed with error code 1 in /mnt/external/project/audiotube/project/env/build/mysql-python 
Traceback (most recent call last): 
    File "/mnt/external/project/audiotube/project/env/bin/pip", line 11, in <module> 
    sys.exit(main()) 
    File "/mnt/external/project/audiotube/project/env/lib/python2.6/site-packages/pip/__init__.py", line 185, in main 
    return command.main(cmd_args) 
    File "/mnt/external/project/audiotube/project/env/lib/python2.6/site-packages/pip/basecommand.py", line 161, in main 
    text = '\n'.join(complete_log) 
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 33: ordinal not in range(128) 
安裝MySQL-蟒

注:CentOS的,virtualenv中

+0

你應該粘貼前幾個錯誤消息,我猜你的問題是由於缺少一些'* mysql * .h'文件引起的。 – WKPlus 2014-10-09 09:15:40

回答

0

我的猜測是,你必須安裝包 「中的python-devel的」。