Suppose you encounter an error such as
appname: error while loading shared libraries: libreadline.so.6: cannot open shared object file: No such file or directory
when attempting to run an application on RHEL 9.
Searching /usr/lib64 you find a file libreadline.so.8.1, a newer version of the shared object the application uses. In a permanent location where you have write access create a directory named something like my_lib, for example in your home directory:
cd mkdir my_lib cd my_libThen create symbolic link to the shared object in the directory you made.
ln -s /usr/lib64/libreadline.so.8.1 libreadline.so.6For the application to find the symbolic link you created, add the path to the link to LD_LIBRARY_PATH environment variable.
export LD_LIBRARY_PATH=/home/$USER/my_lib:$LD_LIBRARY_PATHIf there is a module file for the application this setting should be included in the module file. Otherwise include this line in batch script prior to invoking application.