在安装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. PAT1021(dfs 连通分量)

    A graph which is connected and acyclic can be considered a tree. The height of the tree depends on t ...

  2. POJ-2251.DungeonMaster(三维BFS)

    做题时需要注意,爬楼有向上和向下爬之分... 本题大意:输入 l, r, c, 分别代表地牢的楼层数和每层地牢的长和宽,地牢由rock and point and source and key组成,你 ...

  3. .net 报错access to the path c:\tempimagefiles\msc_cntr_0.txt is denied

    报错信息: 解决方法: 在 Web.Config 的 <System.Web> 里加 <identity impersonate="true"/> 节点即可 ...

  4. [LeetCode_96] Unique Binary Search Trees

    题目链接 https://leetcode.com/problems/unique-binary-search-trees/ 题意 计算给定节点数的BST有多少种 思路 递归 相关知识 二叉搜索树(B ...

  5. win7安装sqlserver2008

    双击启动程序,点击安装

  6. dUMP:A new value is to be assigned to the field "<L_BOX>"

    DUMP: A new value is to be assigned to the field "<L_BOX>", although this field is e ...

  7. 操作符offset

    操作符offset在汇编语言中是由编译器处理的符号,它的功能是取得标号的偏移地址. assume cs:codesg codesg segment start: mov ax, offset star ...

  8. linux下安装以及升级npm,node的方法

    1.最开始使用阿里云文档提供的安装方法一直都是失败的状态,后来找到了新的方法重新安装,按照以下操作一步一步的走即可实现,亲测可用 2.安装完之后,会发现npm和node的版本都偏低,需要重新升级以下, ...

  9. Could not load file or assembly 'Microsoft.EntityFrameworkCore.Relational

    提示的很明确了,缺少Microsoft.EntityFrameworkCore.Relational引用.nuget安装上即可.

  10. vue缓存之keep-alive,设置想要缓存的页面

    由于项目需求从a页面跳转到b页面,返回a页面,a页面数据不能被刷新掉,方法很多列举12 方法1 a页面通过学期按钮切换学期,该学期里more进入b页面,返回a页面,返回回到对应a页面进入的高亮按钮设置 ...