2017-12-30 12 views
0

에 mysqlclient를 설치할 수 없습니다, 그것은되는 mysql_config가 발견되지 않는 것을 보여줍니다이 centos7.3

[[email protected] local]# pip install mysqlclient Collecting mysqlclient Downloading http://mirrors.aliyun.com/pypi/packages/6f/86/bad31f1c1bb0cc99e88ca2adb7cb5c71f7a6540c1bb001480513de76a931/mysqlclient-1.3.12.tar.gz (89kB) 
    100% |████████████████████████████████| 92kB 13.0MB/s 
    Complete output from command python setup.py egg_info: 
    sh: mysql_config: command not found 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "/tmp/pip-build-OJR4Al/mysqlclient/setup.py", line 17, in <module> 
     metadata, options = get_config() 
     File "setup_posix.py", line 44, in get_config 
     libs = mysql_config("libs_r") 
     File "setup_posix.py", line 26, in mysql_config 
     raise EnvironmentError("%s not found" % (mysql_config.path,)) 
    EnvironmentError: mysql_config not found 

    ---------------------------------------- Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-OJR4Al/mysqlclient/ 

구글 후, 내가 sudo는 냠 것은 파이썬 (STABLE)을 설치 에 몇 가지 조언을 찾을 수 mysql을 - (STABLE)는

했지만 작동하지 않았다 :

[[email protected] local]# yum install python-devel mysql-devel 
Loaded plugins: fastestmirror 
Loading mirror speeds from cached hostfile 
Package python-devel-2.7.5-58.el7.x86_64 already installed and latest version 
Resolving Dependencies 
--> Running transaction check 
---> Package mariadb-devel.x86_64 1:5.5.56-2.el7 will be installed 
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.56-2.el7 for package: 1:mariadb-devel-5.5.56-2.el7.x86_64 
--> Running transaction check 
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed 
Removing mariadb-libs.x86_64 1:5.5.56-2.el7 - u due to obsoletes from installed mysql-community-libs-5.7.20-1.el7.x86_64 
--> Restarting Dependency Resolution with new changes. 
--> Running transaction check 
---> Package mariadb-libs.x86_64 1:5.5.56-2.el7 will be installed 
--> Processing Dependency: mariadb-libs(x86-64) = 1:5.5.56-2.el7 for package: 1:mariadb-devel-5.5.56-2.el7.x86_64 
--> Finished Dependency Resolution 
Error: Package: 1:mariadb-devel-5.5.56-2.el7.x86_64 (base) 
      Requires: mariadb-libs(x86-64) = 1:5.5.56-2.el7 
You could try using --skip-broken to work around the problem 
You could try running: rpm -Va --nofiles --nodigest 

내 CentOS는 버전 7.3입니다, 파이썬 3.4.2

+0

# 냠 mysql_community_libs 로드 플러그인을 제거 – skystone

답변

0

mysql을 설치하기 전에 다시 설치하면된다. 이 명령은 'yum -y mysql57-community-release-el7-10.noarch remove'명령으로 환경 파일을 파괴한다고 생각합니다. 제거하도록 표시된 mysql_community_libs 없음 패키지 : fastestmirror 인수 없음 경기 :