error: command 'gcc' failed with exit status 1

疑难杂症   mysql-python  

安装mysql-python模块报错如下

  • easy_install
    error: Setup script exited with error: command 'gcc' failed with exit status 1
  • pip
    error: command 'gcc' failed with exit status 1

解决办法如下

  • centos
    yum install gcc libffi-devel python-devel openssl-devel mysql mysql-devel

安装Readline报此错 "patch command not foud"

  • centos
    yum install patch