error while loading shared libraries: libncurses.so.5: cannot open shared object file

[root@localhost bin]# ./mysql -u root -p ./mysql: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory [root@localhost bin]# rpm -qa | grep ncurses ncurses-base-6.3-13.oe2203sp3.noarch ncurses-libs-6.3-13.oe2203sp3.x86_64 ncurses-6.3-13.oe2203sp3.x86_64 [root@localhost bin]#

error while loading shared libraries: libncurses.so.5: cannot open shared object file_第1张图片

设置 LD_LIBRARY_PATH 环境变量:运行以下命令设置 LD_LIBRARY_PATH 环境变量:(直接解决本人报错)

export LD_LIBRARY_PATH=/usr/lib64:$LD_LIBRARY_PATH

创建软链接:运行以下命令创建一个软链接来解决问题(要注意版本问题)

sudo ln -s /usr/lib64/libncurses.so.6 /usr/lib64/libncurses.so.5

你可能感兴趣的:(服务器)