Answer the question
In order to leave comments, you need to log in
Why do I get an 'error while loading shared libraries' error?
However, when I run the application, I get the error:
hello-world-program: error while loading shared libraries: libFoobar.so.1: cannot open shared object file: No such file or directory
необходимая программе библиотека точно установлена, необходимые файлы библиотеки лежат в /usr/lib. (в /etc/id.so.config смотрел и Idconfig проверял).
Как решить проблему?
Debian
Answer the question
In order to leave comments, you need to log in
Run ldd on the executable program, it will show which libraries are loaded from where :and where missing:
Можно еще включить отладочный режим загрузки библиотек при запуске программы:$ LD_DEBUG=libs ./hello-world-program
You can also read about the LD_LIBRARY_PATH variable as an alternative.
Так же есть флаг компилятора -rpath.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question