MySQL missing mysql_config file

Source: Internet
Author: User

Plan to crawl, install MYSQLDB results using PIP installation Error

On the centos-6.4 pip install Mysql-python, error is as follows [[email protected] mysql-python]$ pip install Mysql-python

Downloading/unpacking Mysql-python

Running setup.py Egg_info for package Mysql-python

SH:/usr/bin/mysql_config:no such file or directory

Traceback (most recent):

File "<string>", line +, in <module>

File "/tmp/pip-build-sentry/mysql-python/setup.py", line +, in <module>

metadata, Options = Get_config ()

File "setup_posix.py", line +, in Get_config

Libs = Mysql_config ("Libs_r")

File "setup_posix.py", line +, in Mysql_config

Raise EnvironmentError ("%s not found"% (Mysql_config.path,))

EnvironmentError:/usr/bin/mysql_config not found

Complete output from command python setup.py egg_info:

SH:/usr/bin/mysql_config:no such file or directory

Traceback (most recent):

File "<string>", line +, in <module>

File "/tmp/pip-build-sentry/mysql-python/setup.py", line +, in <module>

metadata, Options = Get_config ()

File "setup_posix.py", line +, in Get_config

Libs = Mysql_config ("Libs_r")

File "setup_posix.py", line +, in Mysql_config

Raise EnvironmentError ("%s not found"% (Mysql_config.path,))

Environmenterror:mysql_config not found

----------------------------------------

Working environment: centOS6.4

Workaround: 1. Through the error message to see is missing mysql_config, under/usr/bin/should have Mysql_config file not, the solution is Apt-get install Libmysqlclient-dev online, But Apt-get is the Debian, Ubuntu series of network installation commands, Yum is Redhat, CentOS, Fedora is the network installation command, and then found that Centos should be installed Mysql-devel

2. Yum install Mysql-devel, found a conflict, error is as follows:

--Running Transaction check

---> Package mysql-devel.x86_64 0:5.1.69-1.el6_4 'll be installed

--Processing Dependency:mysql = 5.1.69-1.el6_4 for package:mysql-devel-5.1.69-1.el6_4.x86_64

--Running Transaction check

---> Package mysql.x86_64 0:5.1.69-1.el6_4 'll be installed

--Processing conflict:mysql-client-5.5.30-1.el6.x86_64 conflicts MySQL

--Processing conflict:mysql-server-5.5.30-1.el6.x86_64 conflicts MySQL

--processing conflict:mysql-5.1.69-1.el6_4.x86_64 conflicts MySQL

--Finished Dependency Resolution

Error:mysql conflicts with mysql-devel-5.5.30-1.el6.x86_64

You could try using--skip-broken to work around the problem

You could try Running:rpm-va--nofiles--nodigest

3. Use Rpm-qa|grep MySQL to view the installation of MySQL

Mysql-devel-5.5.16-1.el6_4.x86_64

Mysql-client-5.5.16-1.el6_4.x86_64

Mysql-server-5.5.16-1.el6_4.x86_64

4. Use rpm-e mysql-devel-5.5.16-1.el6_4.x86_64 to remove an existing installation package

5. Use the Yum install Mysql-devel discovery and Mysql-server, mysql-client version has conflicting

6. Go online to find the same version download http://downloads.skysql.com/archive/index/p/mysql/v/5.5.16, download 64bit rpm file, use RPM-IVH MYSQL-DEVEL-5.5.16-1.LINUX2.6.X86_64.RPM Installation

7. After successful installation, go to/usr/bin/directory, find the Mysql_config file generated, continue pip install Mysql-python, successfully completed.

MySQL missing mysql_config file

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.