I am trying do deploy a application. I created a *.deb package (using fpm) which installs libraries to
$HOME/.local/lib/nca and binaries to
To make my libraries visible I also installed a conf file to
/etc/ld.so.conf.d/ which consistes solely of a line
$HOME/.local/lib/nca and a newline. When I try to run the application, it complains that it can't open libraries. Problem goes away if I set
So I ran
ldconfig -v and first thing that I saw is this:
/sbin/ldconfig.real: Can't stat $HOME/.local/lib/nca. But the directory is there, calling
stat on it works perfectly fine.
How can I make ldconfig see my deployed libraries?
Ubuntu version 18.04.
EDIT: As requested:
$ ldconfig -v /sbin/ldconfig.real: Can't stat $HOME/.local/lib/nca: No such file or directory /sbin/ldconfig.real: Can't stat /usr/local/lib/x86_64-linux-gnu: No such file or directory /sbin/ldconfig.real: Path `/lib/x86_64-linux-gnu` given more than once /sbin/ldconfig.real: Path `/usr/lib/x86_64-linux-gnu` given more than once
And then it lists libraries for directories as usual. I tried to run it both as sudo and not. Only difference in output that I noticed is that non-sudo prints "Can't create temporary cache file /etc/ld.so.cache~: Permission denied".
LD_LIBRARY_PATH was set using indirect path:
export LD_LIBRARY_PATH=../lib/nca, I did not check if it works with
When I edited
/etc/ld.so.conf.d/nca.conf and changed
/home/marpan (so that full path was
/home/marpan/.local/lib/nca), things worked.
ldconfig -v no longer complained but listed all the libs in the aforementioned path and my executable ran.