报错:ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or director(亲测可用)

启动jumpserver报错 ImportError: libmysqlclient.so.20: cannot open shared object file: No such file or directory。
查找这个libmysqlclient.so.20库文件,由于本机之前部署了mysql,所以可以查到这个文件(如果没有的话,可以安装mysql来获取这个文件)

(py3) [root@centos-02 jumpserver]# find / -name libmysqlclient.so.20
/usr/local/mysql/lib/libmysqlclient.so.20
/usr/local/mysql/mysql-5.7.22-linux-glibc2.12-x86_64/lib/libmysqlclient.so.20
 
(py3) [root@centos-02 jumpserver]# ln -s /usr/local/mysql/lib/libmysqlclient.so.20 /usr/lib/libmysqlclient.so.20
(py3) [root@centos-02 jumpserver]# cat >> /etc/ld.so.conf << EOF
/usr/lib/
/usr/local/mysql/lib/
EOF
(py3) [root@centos-02 jumpserver]# ldconfig


再次启动就ok

posted @ 2021-09-28 09:25  码农编程进阶笔记  阅读(137)  评论(0编辑  收藏  举报
返回顶部 有事您Q我