Skip to content
Advertisement

Error while loading shared libraries: libboost_iostreams.so.1.59.0: cannot open shared object file: No such file or directory

I am running a C++ executable on ubuntu. The executable links into some boost libraries.

This is the output when I attempt to run the binary:

Error while loading shared libraries: libboost_iostreams.so.1.59.0: cannot open shared object file: No such file or directory

What should be the future coarse of action i should take to remove this error.

Advertisement

Answer

Let’s assume your library is being exist but not in standard paths and you’re getting this error while running a binary. In this case you could try to set the LD_LIBRARY_PATH environment variable to point to the directory where the library is located. Then the loader will search for the library in the given path.

export LD_LIBRARY_PATH=/path/to/my/library
./run_my_binary
User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement