error while loading shared libraries from /usr/local/lib, dir not in path under Linux Mint
der-den opened this issue · 1 comments
Hi,
I tried to install libzip from sources..
"make install" drop the libs to /usr/local/lib/ and this path is not in the lib-path of Linux Mint 21.3.
After some minutes of search, i found, i must use ldconfig to fix this and get libzip-tools running.
Maybe you can check and add this to your install script !? Or do i something wrong?
Regards
On Linux, it is not usual to add the runtime path (rpath) into binaries (I don't know why; on other operating systems it is common). For this reason, we explicitly disable this CMake feature on Linux, see here.
Users installing programs on Linux are usually aware of this and either change the ldconfig file or use a different installation prefix that's already covered by the existing ldconfig; or they use their distro's package manager (in your case I think that would be sudo apt install libzip-dev
).
The libzip installation definitely shouldn't touch the ldconfig config file.
In summary, I don't think there's anything libzip should do differently here.
You can
- change the ldconfig file as you did
- install into
/usr
(or some other path that's covered by your ldconfig config file) - try enabling the RPATH handling in
CMakeLists.txt
- or use the libzip-dev Mint package.