欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

mysqlconfig缺失怎么辦

MySQL config缺失怎么辦?這個(gè)問(wèn)題可能是我們?nèi)粘W(xué)習(xí)或工作經(jīng)常見(jiàn)到的。希望通過(guò)這個(gè)問(wèn)題能讓你收獲頗深。下面是小編給大家?guī)?lái)的參考內(nèi)容,讓我們一起來(lái)看看吧!

創(chuàng)新互聯(lián)公司于2013年成立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項(xiàng)目做網(wǎng)站、成都網(wǎng)站制作網(wǎng)站策劃,項(xiàng)目實(shí)施與項(xiàng)目整合能力。我們以讓每一個(gè)夢(mèng)想脫穎而出為使命,1280元武進(jìn)做網(wǎng)站,已為上家服務(wù),為武進(jìn)各地企業(yè)和個(gè)人服務(wù),聯(lián)系電話:13518219792

mysql config缺失的解決辦法:首先使用查看mysql的安裝情況;然后移除已有的安裝包;接著下載64bit的rpm文件;最后重新使用“rpm -ivh MySQL-devel-5.5.16-1.linux...”安裝即可。

MySQL缺失mysql_config文件

問(wèn)題:

工作中需要布置django-sentry日志服務(wù)器,在centos-6.4上pip install mysql-python,報(bào)錯(cuò)如下

[sentry@kjtest111 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 call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-build-sentry/mysql-python/setup.py", line 18, in <module>
        metadata, options = get_config()
      File "setup_posix.py", line 43, in get_config
        libs = mysql_config("libs_r")
      File "setup_posix.py", line 25, 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 call last):
  File "<string>", line 16, in <module>
  File "/tmp/pip-build-sentry/mysql-python/setup.py", line 18, in <module>
    metadata, options = get_config()
  File "setup_posix.py", line 43, in get_config
    libs = mysql_config("libs_r")
  File "setup_posix.py", line 25, in mysql_config
    raise EnvironmentError("%s not found" % (mysql_config.path,))
EnvironmentError: mysql_config not found
----------------------------------------

工作環(huán)境:centOS6.4

解決方法:

1.  通過(guò)報(bào)錯(cuò)信息看出是缺少mysql_config,在/usr/bin/下面應(yīng)該有的mysql_config文件沒(méi)有,網(wǎng)上的解決方案都是apt-get install libmysqlclient-dev,但是apt-get是Debian、Ubuntu系列的網(wǎng)絡(luò)安裝命令,yum是Redhat、Centos、Fedora是網(wǎng)絡(luò)安裝命令,接著發(fā)現(xiàn)Centos上應(yīng)該安裝mysql-devel

2.  yum install mysql-devel,發(fā)現(xiàn)有沖突,報(bào)錯(cuò)如下:

--> Running transaction check
---> Package mysql-devel.x86_64 0:5.1.69-1.el6_4 will 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 will 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.  使用 rpm -qa|grep mysql查看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.  使用rpm -e mysql-devel-5.5.16-1.el6_4.x86_64移除已有的安裝包

5.  再次使用yum install mysql-devel 發(fā)現(xiàn)和mysql-server, mysql-client的版本有沖突

6.  去網(wǎng)上尋找相同的版本下載http://downloads.skysql.com/archive/index/p/mysql/v/5.5.16,下載64bit的rpm文件,使用rpm -ivh MySQL-devel-5.5.16-1.linux2.6.x86_64.rpm安裝

7.  安裝成功后,去/usr/bin/目錄下,發(fā)現(xiàn)生成了mysql_config文件,繼續(xù)pip install mysql-python,順利完成。

感謝各位的閱讀!看完上述內(nèi)容,你們對(duì)mysql config缺失怎么辦大概了解了嗎?希望文章內(nèi)容對(duì)大家有所幫助。如果想了解更多相關(guān)文章內(nèi)容,歡迎關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道。

網(wǎng)頁(yè)標(biāo)題:mysqlconfig缺失怎么辦
標(biāo)題路徑:http://www.chinadenli.net/article10/gpdido.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供定制開(kāi)發(fā)全網(wǎng)營(yíng)銷(xiāo)推廣外貿(mào)網(wǎng)站建設(shè)云服務(wù)器網(wǎng)站維護(hù)Google

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

營(yíng)銷(xiāo)型網(wǎng)站建設(shè)