I'm developing an application that I packed as .opkg format.
The data files include some self build shard libraries that my application will use; I put them in xxxx/my-package/usr/lib/a.so
, where xxx/my-package/
is set as my .opkg root in opkg.conf.
Then use opkg-build to create the package. In order for my app file to find the a.so
, I want to add the xxx/my-package/usr/lib
to LD_LIBRARY_PATH
. And I want this to be done right after the installation, so I put "export LD_LIBRARY_PATH=xxx/my-package/usr/lib
" inside the postinst file.
But after I install it, when I print the 'set', instead of LD_LIBRARY_PATH=xxx/my-package/usr/lib
, I got LD_LIBRARY_PATH=xxxx/my-package
. Is it because at the postinst phase the usr/lib
subdirectory haven't been created? Or? Any suggestion how should I achieve auto LD_LIBRARY_PATH
set into my app directory after the installation?
I solved this by rpath instead. Ẃorked as expected.