mysqldb mysql_config
在安装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.
-
C Compiler flags to find include files and critical compiler flags and defines used when compiling the
libmysqlclientlibrary. 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--includefor more portable options that contain only include paths. -
Like
--cflags, but for C++ compiler flags. -
Compiler options to find MySQL include files.
-
Libraries and options required to link with the MySQL client library.
mysqldb mysql_config的更多相关文章
- python 安装MySQLdb mysql_config not fount
缺少 libmysqlclient-dev 应该是安装MySQL的锅. 资料:http://www.cnblogs.com/xiazh/archive/2012/12/12/2814289.html ...
- 解决:python安装mysqldb模块报 EnvironmentError: mysql_config not found
最近学习python操作mysql需要安装mysqldb模块 出现EnvironmentError: mysql_config not found 经网上查看,需要安装mysql客户端开发库libmy ...
- 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 ...
- Mac 下安装mysqldb 问题:一条命令解决mysql_config not found
遇到过几次pip安装mysql-python的时候出现如题的问题,在这里记录一下解决方法. 找不到mysql_config一般是由于通过lnmp.org或者其他方式安装mysql以后mysql_con ...
- 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] ...
- Mysql5.5升级到5.7后MySQLdb不能正常使用的问题解决
ubuntu系统 报错信息1 Type "help", "copyright", "credits" or "license&qu ...
- Python的MySQLdb模块安装
MySQL-python-1.2.1.tar.gz 下载地址:https://pan.baidu.com/s/1kVfH84v 然后解压,打开README(这个其实没有什么鸟用) 里面有安装过程: ...
- Python中MySQLdb模块的安装
安装 MySQLdb是Python语言访问mysql数据库的一个模块,如果你不确定自己的Python环境中是否已经安装了这个模块,可以打开Python shell,输入import MySQLdb,如 ...
- [Python] MySQLdb(即 MySQL-python 包)在 OS X 中安装指南
本文参考:http://www.cnblogs.com/ifantastic/archive/2013/04/13/3017677.html 安装环境:OS X 操作系统,Python 2.7.10 ...
随机推荐
- Gym - 100989G 二分
链接:ECJTU 2018 Summer Training 1 - Virtual Judge https://vjudge.net/contest/236677#problem/G 谷歌翻译: 距 ...
- numpy 之矩阵的认知
di numpy 矩阵的创建与应用 可以用np.mat(a) 将a转变成矩阵 矩阵的加减法和 array相同 矩阵的乘法,如果矩阵要相乘的话就要A矩阵的行数,和B矩阵的列数相同才可以 这是查看数组不重 ...
- MYSQL 插入数据乱码
1.最近在写电商项目 遇见过向数据库中加入数据乱码问题 最开始以为是,数据库的问题但是一看 没问题啊 于是又看了项目的默认编码,也没问题啊 那么问题来了,在哪出现了问题呢 于是 博主 在 tomact ...
- Beginning C# Programming with Unity
Welcome to the wonderful world of programming! In this book you’ll learn the basics of programming u ...
- Codeforces Beta Round #29 (Div. 2, Codeforces format)
Codeforces Beta Round #29 (Div. 2, Codeforces format) http://codeforces.com/contest/29 A #include< ...
- 创建React组件
组件概述 组件可以将UI切分成一些独立的.可复用的部件,这样你就只需专注于构建每一个单独的部件. 组件从概念上看就像是函数,它可以接收任意的输入值(称之为“props”),并返回一个需要在页面上展示的 ...
- C++编译中的内存分配
一个由 C/C++ 编译的程序占用的内存分为以下五个部分 代码区:存放CPU执行的机器指令,代码区是可共享,并且是只读的. 数据区:存放已初始化的全局变量.静态变量(全局和局部).常量数据. BBS区 ...
- Mac 动态库加载不上
OC xcode can't found xxx.dylib 1 targer- build phase :link binary with library添加动态库 注意不要将后边的选项选成opti ...
- Spring <context:annotation-config> 和 <context:component-scan> 区别
一篇很不错的文章,看到就是赚到Get.... https://www.cnblogs.com/leiOOlei/p/3713989.html 说白了 :<context:component-sc ...
- Linux安装命令出现如下错误:cannot find a valid baseurl for repo :base/7x86_64
今天刚回到家,在我的虚拟机上有安装了一个Linux系统,安装好之后,想要安装如下命令,yum install wget,yum install gcc,yum install vim,发现一个也没有安 ...