stlink: Broken dependencies in installed files
- Operating system: Linux, Ubuntu 16.04
- Stlink tools version: from HASH b5bbf3d
- Stlink commandline tool name: all programms
The problem is from commit b5bbf3d until last commit. I build st-link programs from source. Everythink is OK. After installing “sudo make install”, I ran the program “st-info” (or other st-xxxx program) and this is output:
st-info: error while loading shared libraries: libstlink.so.1: cannot open shared object file: No such file or directory.
I try the installation procedure on 3 different PC, same result.
About this issue
- Original URL
- State: closed
- Created 8 years ago
- Comments: 22 (9 by maintainers)
Output from ldd /usr/local/st-info:
Solution was:
After this, everythink works fine.
but I think, this is hack. It can be in installation script or in linker settings.
It works for me (commit g7b358fe):
make install to custom destination dir:
dynamic linker (ldd) is unable to find the library:
exporting a custom library path:
running
st-info --versionenjoy 😃
this may be fixed via
sudo ldconfigThis is not a hack, because package maintainers always run
ld-configafter a library is installed. Then the library is added to the cache:/etc/ld.so.cache. You must make sure/usr/local/libis added to theld.so.confsearch paths. On debian 8 it is configured here:You should read the man-page of
ld-configandlddto understand how executables are dynamically linked.This is different from Mac OS X, Windows, *BSD so it won’t be added.
Fixed it. I re-installed the 1.6.0 version, using
sudo makeinstead ofmakeand it installed correctly, no more errors occuredsudo ldconfigsolves the problem for me…What the problem??? Ubuntu 16.04.
Solution was: libstlink.so.1 was in /usr/local/lib/lib, you ask: “LOL what???”. It was a step-by-step installation by example -> https://github.com/texane/stlink/blob/master/doc/compiling.md Extracted from lib/lib in lib and everything is fine.
Could you run
ldd /usr/local/bin/st-info? probably the references to the shared library are not good. I seest-infois looking forlibstlink.so.1is it installed under/usr/local/lib? Maybeld-configneeds to be run before it is found.