• 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. Copy Shared Object

Copy Old Version of 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.

      Create a VCL reservation for HPC (CentOS 7 64 bit VM) image. Then search /usr/lib64 for the shared object libreadline.so.6. Note that there may be several links with similar names in addition to the actual shared object file.

      vclvm179-209 ~]$ ls -l /usr/lib64 | grep readline
      lrwxrwxrwx.  1 root root       28 Oct  7  2019 libreadline.so -> ../../lib64/lireadline.so.6
      lrwxrwxrwx.  1 root root       18 Oct  7  2019 libreadline.so.6 -> libreadline.so.6.2
      -rwxr-xr-x.  1 root root   285136 Aug  8  2019 libreadline.so.6.2
      
      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 copy the shared object from the VCL image - take care to copy the actual shared object, not one of the symbolic links.
      cp /usr/lib64/libreadline.so.6.2 .
      ln -s libreadline.so.6.2 libreadline.so.6
      ln -s libreadline.so.6 libreadline.so
      
      For the application to find the shared object you copied, 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.