MYSQL之 error while loading shared libraries: libtinfo.so.5: cannot open shared objectfile: No such f
环境:ubuntu18
登陆MYSQL时遇到错误:mysql: error while loading shared libraries: libtinfo.so.5: cannot open shared object file: No such file or directory
解决,查看MYSQL的依赖
$ ldd mysql
libtinfo.so.5 => not found
1
2
查看依赖是否存在
$ ls /lib/x86_64-linux-gnu/libtinfo.so.*
1
如果不存在,则去一个好的ubunu中复制一个libtinfo.so.5,并放入 /lib/x86_64-linux-gnu 目录下:
$ locate libtinfo.so.5 # 或者直接定位看linux中有没有然后复制一个就可以了
ln -s /usr/lib/libncurses.so.5 /usr/lib/libtinfo.so.5
ln -s /usr/lib/libncurses.so.5 /lib/libtinfo.so.5
---------------------
就可以了
备注:libtinfo.so.5 百度云:https://pan.baidu.com/s/1SFza-Fa2-CVQh955XsJsZA
备注:查看MYSQL的依赖
$ cd /usr/local/mysql/bin
$ ldd mysql
linux-vdso.so.1 (0x00007ffc9bffc000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f5f948b4000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f5f948aa000)
libssl.so.1.0.0 => /usr/local/mysql_8.0.13/bin/./libssl.so.1.0.0 (0x00007f5f9463a000)
libcrypto.so.1.0.0 => /usr/local/mysql_8.0.13/bin/./libcrypto.so.1.0.0 (0x00007f5f94203000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f5f941fd000)
libtinfo.so.5 => /lib/x86_64-linux-gnu/libtinfo.so.5 (0x00007f5f93fd3000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f5f93e47000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f5f93cba000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f5f93ca0000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f5f93ab6000)
/lib64/ld-linux-x86-64.so.2 (0x00007f5f948ea000)
参考:http://blog.chinaunix.net/uid-24532607-id-2778601.html
---------------------
作者:Ocean&&Star
来源:CSDN
原文:https://blog.csdn.net/zhizhengguan/article/details/86686621
版权声明:本文为博主原创文章,转载请附上博文链接!