在安装mysqldb Python的时候会用到mysql_config,但是正常安装的MySQL环境下是没有这个文件的,这个文件在Linux下是可执行文件,所以需要到mysql官方网站上下载MySQL-devel-5.1.50-1.glibc23.i386.rpm,然后用whereis mysql_config命令即可找到mysql_config文件啦

mysql_config在/usr/lib/mysql和/usr/bin下。

找不到mysql_config一般是由于通过lnmp.org或者其他方式安装mysql以后mysql_config是在/usr/local/mysql/bin/里面,这里面的文件不是在任意位置都可以访问的

解决方法:

执行

ln -s /usr/local/mysql/bin/mysql_config /usr/local/bin/mysql_config

将mysql_config链接到/usr/local/bin目录下

https://dev.mysql.com/doc/refman/5.7/en/mysql-config.html

mysql_config provides you with useful information for compiling your MySQL client and connecting it to MySQL. It is a shell script, so it is available only on Unix and Unix-like systems.

  • --cflags

    C Compiler flags to find include files and critical compiler flags and defines used when compiling the libmysqlclient library. The options returned are tied to the specific compiler that was used when the library was created and might clash with the settings for your own compiler. Use --include for more portable options that contain only include paths.

  • --cxxflags

    Like --cflags, but for C++ compiler flags.

  • --include

    Compiler options to find MySQL include files.

  • --libs

    Libraries and options required to link with the MySQL client library.

mysqldb mysql_config的更多相关文章

  1. python 安装MySQLdb mysql_config not fount

    缺少 libmysqlclient-dev 应该是安装MySQL的锅. 资料:http://www.cnblogs.com/xiazh/archive/2012/12/12/2814289.html ...

  2. 解决:python安装mysqldb模块报 EnvironmentError: mysql_config not found

    最近学习python操作mysql需要安装mysqldb模块 出现EnvironmentError: mysql_config not found 经网上查看,需要安装mysql客户端开发库libmy ...

  3. MySQLdb/mysql-python安装时EnvironmentError: mysql_config not found

    代码:root@vpser:~# cd MySQL-python-1.2.3root@vpser:~/MySQL-python-1.2.3# python setup.py install sh: m ...

  4. Mac 下安装mysqldb 问题:一条命令解决mysql_config not found

    遇到过几次pip安装mysql-python的时候出现如题的问题,在这里记录一下解决方法. 找不到mysql_config一般是由于通过lnmp.org或者其他方式安装mysql以后mysql_con ...

  5. 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 : command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] ...

  6. Mysql5.5升级到5.7后MySQLdb不能正常使用的问题解决

    ubuntu系统 报错信息1 Type "help", "copyright", "credits" or "license&qu ...

  7. Python的MySQLdb模块安装

    MySQL-python-1.2.1.tar.gz  下载地址:https://pan.baidu.com/s/1kVfH84v 然后解压,打开README(这个其实没有什么鸟用) 里面有安装过程: ...

  8. Python中MySQLdb模块的安装

    安装 MySQLdb是Python语言访问mysql数据库的一个模块,如果你不确定自己的Python环境中是否已经安装了这个模块,可以打开Python shell,输入import MySQLdb,如 ...

  9. [Python] MySQLdb(即 MySQL-python 包)在 OS X 中安装指南

    本文参考:http://www.cnblogs.com/ifantastic/archive/2013/04/13/3017677.html 安装环境:OS X 操作系统,Python 2.7.10 ...

随机推荐

  1. vue confirm确认

    this.$confirm('您确定删除吗?').then(_ => { do something ... (确认) }).catch(_ => { do something ... (取 ...

  2. mock.js 劫持 ajax,模拟数据

    http://mockjs.com/ Mock.js 是一款前端开发中拦截Ajax请求再生成随机数据响应的工具.可以用来模拟服务器响应. 优点是非常简单方便, 无侵入性, 基本覆盖常用的接口数据类型. ...

  3. 关于 No buffer space available (maximum connections reached?): connect 的处理

    一.问题: hudson一个应用打包部署一直不成功,检查报错 检查项目的JOB配置,开始以为是SVN的问题,但是重启SVN后问题一直存在 二.分析: TCP协议中,关闭TCP连接的是Server端(当 ...

  4. Python os.sep()

    os.sep是什么 python是跨平台的.在Windows上,文件的路径分隔符是'\',在Linux上是'/'. 为了让代码在不同的平台上都能运行,那么路径应该写'\'还是'/'呢? 使用os.se ...

  5. AssetBundle Manager and Example Scenes

    示例 1:加载资源 使用 “Asset/AssetBundles/Simulation Mode” 菜单打开模拟模式 打开 “AssetBundleSample/Scenes/AssetLoader” ...

  6. vue 添加子路由,并对路由重定向

    // 用户信息首页 { path: '/user/index', name: 'userIndex', component: userIndex, redirect: '/user/index/sho ...

  7. 1.尽量以const ,enum,inline替换define

    1.#define为预处理阶段命令 原因:有可能记号名称没有进入记号表,而出现编译错误,即编译器并没看到过该定义. class专属常量const 一般定义为static,保证该常量至多有一份实体. 枚 ...

  8. js常用的数组,,字符串,,Math..正则方法

    数组 slice[start,end] 返回从原数组中指定开始下标到结束下标之间的项目组成新数组(不会影响原数组) splice() 1.删除功能:2个参数 , 起始位置 , 删除的项目 2.插入功能 ...

  9. ThreadLocal ——android消息机制handler在非主线程创建not called Looper.prepare() 错误的原因

    引用自:https://www.jianshu.com/p/a8fa72e708d3 引出: 使用Handler的时候,其必须要跟一个Looper绑定.在UI线程可直接初始化Handler来使用.但是 ...

  10. classpath分析

    1. 什么是classpath? classpath相当于Java执行环境,它指定了一些常用的包或jar的位置,方便我们对项目文件的使用,而不必重复多次写所需要文件的位置.    在classpath ...