Recently I faced this problem while trying to start MySQL Database Instance on a new Linux Environment :

error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

 

In the below step, we can see ncurses 6.1 library is installed, but no libncurses.so.5 is present:

[root@jack ~]# ls -l /usr/lib64/libncurses*
lrwxrwxrwx. 1 root root   17 Jul 26 2021 /usr/lib64/libncurses.so.6 -> libncurses.so.6.1
-rwxr-xr-x. 1 root root 216912 Jul 26 2021 /usr/lib64/libncurses.so.6.1
lrwxrwxrwx. 1 root root   18 Jul 26 2021 /usr/lib64/libncursesw.so.6 -> libncursesw.so.6.1
-rwxr-xr-x. 1 root root 300104 Jul 26 2021 /usr/lib64/libncursesw.so.6.1

 

As they are backward compatible, if libncurses6 is present, a symlink can be created for libncurses.so.5 to libncurses.so.6 (the specific version may vary depending on installation.


root@jack ~]# ln -s /usr/lib64/libncurses.so.6.1 /usr/lib64/libncurses.so.5