I wish to build and install a software locally to the $HOME/.local/
path instead of a system-wide /usr/
folder. The software uses CMAKE for compilation.
After installation, the software binaries and libraries get stored in $HOME/.local/bin/
and $HOME/.local/lib/
, respectively. However, when I try to run the program, it throws an error that the required library is not found (which, by the way, is present in $HOME/.local/lib/
).
The program works fine if I set the $LD_LIBRARY_PATH
to $HOME/.local/lib
. But I don't want to do this. Hence, instead of this, I would like to know how to specify the RPATH
variable (which would point to $HOME/.local/lib
) while compiling the software using CMAKE.
Kindly help.