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 ...
随机推荐
- 五:python 对象类型详解二:字符串(上)
一:常量字符串 常量字符串用起来相对简单,也许最复杂的事情就是在代码中有如此多的方法来编写它们. eg:单引号:'spam"m' , 双引号: “spa'm” , 三引号:‘’‘... ...
- centos 7 下 Ceph 配置安装
一.环境介绍 系统: CentOS Linux release 7.3.1611 (Core) 硬盘: 系统盘:300GB*2-raid 1 OSD:600GB*4-raid 5 ceph ...
- NumPy 排序、条件刷选函数
NumPy 排序.条件刷选函数 NumPy 提供了多种排序的方法. 这些排序函数实现不同的排序算法,每个排序算法的特征在于执行速度,最坏情况性能,所需的工作空间和算法的稳定性. 下表显示了三种排序算法 ...
- ASP.Net MVC 中EF实体的属性取消映射数据库、自定义名称
例如:数据库中一个字段名称为CompanyId 自定义实体数据名称 [Column("CompanyId")] public int Id{ get; set; } 这样就可以使用 ...
- 【python中调用shell命令使用PIPE】使用PIPE作为stdout出现假卡死的情况——将stdout重定向为输出到临时文件
在Python中,调用:subprocess.Popen(cmd, stdout = PIPE, stderr = PIPE, shell= true)的时候,如果调用的shell命令本身在执行之后会 ...
- 844. Backspace String Compare判断删除后的结果是否相等
[抄题]: Given two strings S and T, return if they are equal when both are typed into empty text editor ...
- SQL创建删除索引
--创建唯一聚集索引create unique clustered index pk_table1 on table1 (column1) --创建唯一非聚集索引create unique noncl ...
- Linux系统声卡问题
问题:Linux系统中有声卡设备,但是听不到声音 一.声卡驱动没有安装 1.通过插拔声卡查出声卡驱动 2.在相应的kernel中编译内核 修改保存.config文件,然后进行编译 make -j ma ...
- php使用sftp上传文件
搞这个SFTP文件传输搞了一整天真是醉了,从sftp安装,到php的ssh2扩展安装,最后到php应用ssh2来上传文件:最后就没有最后了 Failure creating remote file: ...
- docker搭建lnmp(一)
因为安装过程中涉及到一些修改配置文件的步骤,由于刚尝试不太会,所以这里都是通过安装好后,进入容器修改配置,最后退出重启容器. 目录结构 docker ├── mysql │ └── dockerf ...