S
S
Sane Barbarian2016-12-08 16:44:42
linux
Sane Barbarian, 2016-12-08 16:44:42

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

3 answer(s)
I
ipc_ngs, 2016-12-08
@SaneBarbarian

Run ldd on the executable program, it will show which libraries are loaded from where :and where missing:
Можно еще включить отладочный режим загрузки библиотек при запуске программы:
$ LD_DEBUG=libs ./hello-world-program

M
Michael., 2016-12-09
@kulinich

You can also read about the LD_LIBRARY_PATH variable as an alternative.
Так же есть флаг компилятора -rpath.

M
Maxim Moseychuk, 2016-12-08
@fshp

Какая разрядность дистрибутива? Программы? Библиотеки?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question