zoukankan      html  css  js  c++  java
  • centos7 安装mysqlclient报错问题

    centos7 安装mysqlclient报错问题

    1.安装 pip3 install mysqlclient 报错:

    ERROR: Command errored out with exit status 1: command: /data/env/pyweb/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-noasaa4g/mysqlclient/setup.py'"'"'; file='"'"'/tmp/pip-install-noasaa4g/mysqlclient/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-noasaa4g/mysqlclient/pip-egg-info cwd: /tmp/pip-install-noasaa4g/mysqlclient/ Complete output (12 lines): /bin/sh: mysql_config: command not found /bin/sh: mariadb_config: command not found /bin/sh: mysql_config: command not found Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-noasaa4g/mysqlclient/setup.py", line 16, in <module> metadata, options = get_config() File "/tmp/pip-install-noasaa4g/mysqlclient/setup_posix.py", line 61, in get_config libs = mysql_config("libs") File "/tmp/pip-install-noasaa4g/mysqlclient/setup_posix.py", line 29, in mysql_config raise EnvironmentError("%s not found" % (_mysql_config_path,)) OSError: mysql_config not found ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

     

     

     

    2.分析与解决: 查看报错信息:

    mysql_config not found

    确定是mysql_config依赖包出现了问题,添加软链接

    ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config 发现还是不行,网上说需要先安装mysql-devel

    yum install mysql-devel

    再安装mysqlclient

    pip3 install mysqlclient

    解决 ———————————————— 版权声明:本文为CSDN博主「郑德帅」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_36853469/article/details/103474533

    个人小站,欢迎访问!http://klvr.xyz
  • 相关阅读:
    redis之通信开销限制redis cluster规模的关键因素
    redis解决秒杀问题与数据倾斜
    codis与redis
    脑裂中的数据丢失
    redis主从同步与故障切换的配置项可能出现的问题
    redi事务机制
    redis并发访问的问题之实现分布式锁
    redis的小功能 bitmaps 发布订阅,HyperLogLog GEO LUA
    redis之api学习
    Ubuntu17.04安装WineQQ7.8及微信
  • 原文地址:https://www.cnblogs.com/xxks/p/15449153.html
Copyright © 2011-2022 走看看