Complete output( 12 lines) : /bin/sh: mysql_config:未找到命令/bin/sh: mariadb_config:未找到命令/bin/sh: mysql_

解决Linux下安装 superset平台的mysql驱动安装时的报错


using cached mysqlclient-i.4.3.tar.gz (86 kB)reparing metadata (setup.py) … error
ERROR:Command errored out with exit status l:
command:/home/lqs/Niniconda3/envs/superset/bin/python -c ‘import io,os,sys,setuptools,tokenize; sys.argv[0] = 1"1""/tmp/pip-install-t9ueiovz/mysqlclient_a638le83f0194d27a9510a5dle38a7e7/setup.py’“i”’;file=’" i “” /tmp/pip-install-t9ueiovz/mysqlclient_a6381e83f0194d27a9510a5dle38a7e7/setup.py’ “”" ‘;f = getattr(tokenize,’ " ’ " open’" ‘" ‘,open)(file) if os.path.exists(file) else io.stringI0(’". " ‘from setuptools import setup; setup()’ " );code = f.read().replace( T.""\厂\n’"""’,"""""\n’""" ) ;f.close() ;exec(compile(code,fille, “”’ exec’"
37,dofle.'ii n 'exec '"." . )
’ egg_info --egg-base /tmp/pip-pip-egg-info-qoirjh5i
cwd: /tmp/pip-install-t9ueiovz/mysqlclient_a638le83f0194d27a9510a5dle38a7e7/complete output(i2 lines) :
/bin/sh: mysql_config:未找到命令/bin/sh: mariadb_config:未找到命令/bin/sh: mysql_config:未找到命令Traceback (most recent call last) :
File “<string-” , line l, in
File " /tmp/pip-install-t9ueiovz/mysqlclient_a6381e83f0194d27a9510a5d1e38a7e7/setup.py",line l6, in
metadata,options = get_config()
File “/tmp/pip-install-t9ueiovz/mysqlclient_a638le83f0194d27a9510a5dle38a7e7/setup_posix.py” , line 6l, in get_config
'libs = mysql_config(“libs “)
File " /tmp/pip-install-t9ueiovz/mysqlclient_a6381e83f0194d27a9510a5dle38a7e7/setup_posix.p, line 29, inmysql_config
raise’EnvironmentError(”%s not found” % (_mysql_config_path, ))0SError: mysql_config not found


cwa. / Lp7Pp-Ln5Lall-LrueiovLfmy-
Complete output( 12 lines) :
/bin/sh: mysql_config:未找到命令
/bin/sh: mariadb_config:未找到命令
/bin/sh: mysql_config:未找到命令
Traceback (most recent call last):

raise EnvironmentError("%s not found" % (_mysql_config_path, ))oSError: mysql_config not found

报错详情如下:

报错详情


解决方案:
先参考一下 'https://blog.csdn.net/madman163/article/details/115467944' 博主的的解决方案:

查了下mysql_config为空
[root@localhost merge]# whereis mysql_config
mysql_config:
判断没安mysql-devel
[root@localhost merge]# cd /etc/yum.repos.d/
[root@localhost yum.repos.d]# wget http://repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
[root@localhost yum.repos.d]# yum install mysql-devel

第二次安装 [root@localhost merge]# python3 -m pip install -r requirements.txt 我按照了博主的方案进行尝试了,到sudo yum install mysql-devel报错了,然后接着运行python3 -m pip install -r requirements.txt命令也报错了,为此弄了好几次,没有弄好,后面我没办法,死马当活马医就可以了。
(superset) [lqs@hadoop102 yum.repos.d]$ sudo yum install mysql-devel
己加载插件:fastestmirror, langpacks
错误:软件包:1:mariadb-devel-5.5.68-1.el7.x86_64 (base)
需要:mariadb-libs(x86-64) =1:5.5.68-l.el7您可以尝试添加--skip-broken选项来解决该问题
您可以尝试执行:rpm -Va --nofiles --nodigest
自己的解决办法:
#运行如下命令:
#1
(superset) [(iqs@hadoop102~]$ cd jetc/yum. repos.d/
#2
wget http: //repo.mysql.com/mysql57-community-release-el7-8.noarch.rpm
#3
pip install pymssql
#可以换成这样,指定下载源地址,这样下载快一些
pip install pymssql -i https://pypi. douban.com/simple/

#就这样就可以啦

相关截图如下:
运行1、2命令截图
运行1、2两个命令的截图
运行3命令和按照成功截图如下
运行3两个的截图

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小雏菊的成长

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值