hide old libraries from linux system without root access

I have access to an old cluster for computations. The Operating system of the cluster is very old and outdated. Some of my codes need new libraries like glibc-2.14 or higher to run. I found "junest" that allows us to easily have new libraries on our local account. But the problem is that the system always uses its default libraries although I defined the PATH to new ones via LD_LIBRARY_PATH variable.
I want to know that:
Is there any method to make my Linux system completely blind form libraries existing in paths like "/usr/lib" and force it to use the new ones, which in my case exist in the path "~/.junest/usr/lib".
Thank you very much.


Well-Known Member
I don't think you can hide the libraries. The executables in the old OS will be linked with those old libraries. I don't think you can simply point those executables to a new set of libraries without completely rebuilding them.

However - for executables that you are building - you should be able to build and link them against the newer libraries that you have locally.
If memory serves, you need to use -L to specify the path to the libraries at link time and -rpath to specify the path to the libraries at run-time. So set -L and -rpath to point to the same directory and your executables should use the local libraries instead of the system-wide ones.

This link should help explain things:

Staff online

Members online

Latest posts