Reputation: 1
I'm trying to run an executable as root to reduce its niceness under 0. When I try to run this executable as normal user the execution flows as expected, but if I run it as root (either using sudo or a root terminal) it cannot find a shared library. The library is in a directory under /home/user. Any suggestion as to why this is happening and how to solve? Thanks!
Upvotes: 0
Views: 822
Reputation: 37915
You can use the LD_LIBRARY_PATH
environment variable to let the application know where to look for dynamic libraries.
So add your custom location (/home/user/path/to/lib) to this environment variable.
Upvotes: 0
Reputation: 4131
You could:
/home/user
in the root $LD_LIBRARY_PATH
environment variable (e.g. by adding it in /root/.bashrc
)Upvotes: 1