Library management in hassio

I was thinking.

I noticed the directory /config/deps is there out of the box and a thought struck me…
Would it not be possible to have libraries in a shared folder like /config/deps or /config/lib and adding ENV LD_LIBRARY_PATH="/config/lib" in hassio container?

This way we would compile for example the Tellstick source only once in the add-on and then publish the shared libraries required by hassio and in a common folder.
I tried this in lab environment, moving the tellstick libraries in /config/lib and setting LD_LIBRARY_PATH. It works like a charm.

Don’t get stuck on the tellstick specifically, it was used as an example.

These paths will be given priority over the standard library paths /lib and /usr/lib. The standard paths will still be searched, but only after the list of paths in LD_LIBRARY_PATH has been exhausted.

1 Like