因为缺少mysql-config
不知道如何下载MySQL-devel-5.6.24-1.el6.x86_64
在linux安装hue报的错
- File "setup.py", line 15, in
- metadata, options = get_config()
- File "/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/ext-py/MySQL-python-1.2.3c1/setup_posix.py", line 43, in get_config
- libs = mysql_config("libs_r")
- File "/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/ext-py/MySQL-python-1.2.3c1/setup_posix.py", line 24, in mysql_config
- raise EnvironmentError("%s not found" % (mysql_config.path,))
- EnvironmentError: mysql_config not found
- make[2]: *** [/opt/module/hue-3.7.0-cdh5.3.6/desktop/core/build/MySQL-python-1.2.3c1/egg.stamp] 错误 1
- make[2]: Leaving directory `/opt/module/hue-3.7.0-cdh5.3.6/desktop/core'
- make[1]: *** [.recursive-env-install/core] 错误 2
- make[1]: Leaving directory `/opt/module/hue-3.7.0-cdh5.3.6/desktop'
- make: *** [desktop] 错误 2
下面是我百度的方法
-
通过报错信息看出是缺少mysql_config,在/usr/bin/下面应该有的mysql_config文件没有,
- 网上的解决方案都是apt-get install libmysqlclient-dev,但是apt-get是Debian、Ubuntu系列的网络安装命令,
- yum是Redhat、Centos、Fedora是网络安装命令,接着发现Centos上应该安装mysql-devel
- 2. yum install mysql-devel,发现有冲突,报错如下:
- 3. 使用 rpm -qa|grep mysql查看mysql的安装情况
- mysql-devel-5.6.24-1.el6_4.x86_64
- mysql-client-5.6.24-1.el6_4.x86_64
- mysql-server-5.6.24-1.el6_4.x86_64
- 4. 使用rpm -e mysql-devel-5.6.24-1.el6_4.x86_64移除已有的安装包
- 5. 再次使用yum install mysql-devel 发现和mysql-server, mysql-client的版本有冲突
- 6. 去网上寻找相同的版本下载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/目录下,发现生成了mysql_config文件,继续pip install mysql-python,顺利完成
提供下载地址