• Resources
    • Request Access
    • Manage Existing Project
    • Compute Resources
    • Software Packages
    • Partner Program
  • Documentation
    • Get Started
    • Log In
    • Transfer Files
    • Storage
    • Compiling
    • Running Jobs
  • Support
    • Contact Us
    • Training and Events
    • Links for Learning
  • Cluster Status
  1. OIT HPC
  2. Hazel
  3. Symbolic Link

Symbolic Link to Shared Object

      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_lib
      
      Then create symbolic link to the shared object in the directory you made.
      ln -s /usr/lib64/libreadline.so.8.1 libreadline.so.6
      
      For 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_PATH
      
      If 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.