zoukankan      html  css  js  c++  java
  • centos 7.3 安装 mysqldb 报错 EnvironmentError: mysql_config not found ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

    ERROR: Command errored out with exit status 1:
         command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-pS3uLm/mysql-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-pS3uLm/mysql-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'
    '"'"', '"'"'
    '"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-pS3uLm/mysql-python/pip-egg-info
             cwd: /tmp/pip-install-pS3uLm/mysql-python/
        Complete output (10 lines):
        sh: mysql_config: command not found
        Traceback (most recent call last):
          File "<string>", line 1, in <module>
          File "/tmp/pip-install-pS3uLm/mysql-python/setup.py", line 17, in <module>
            metadata, options = get_config()
          File "setup_posix.py", line 43, in get_config
            libs = mysql_config("libs_r")
          File "setup_posix.py", line 25, in mysql_config
            raise EnvironmentError("%s not found" % (mysql_config.path,))
        EnvironmentError: mysql_config not found
        ----------------------------------------
    ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
    yum -y install mysql-devel
    
    pip install MySQL-python

    执行上面两条命令,成功安装

  • 相关阅读:
    码农自白:这样成为谷歌工程师
    Vim命令合集
    应该知道的Linux技巧
    在Ubuntu上建立Arm Linux 开发环境
    Linux 下socket通信终极指南(附TCP、UDP完整代码)
    Socket通信原理和实践
    用 gdb 调试 GCC 程序
    Quartz学习记录
    shiro学习记录(三)
    shiro学习记录(二)
  • 原文地址:https://www.cnblogs.com/xuchunlin/p/11759623.html
Copyright © 2011-2022 走看看