0

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?

Unheilig
  • 16,196
  • 193
  • 68
  • 98
user1836141
  • 91
  • 2
  • 5

1 Answers1

0

I solved this by rpath instead. Ẃorked as expected.

user1836141
  • 91
  • 2
  • 5