I am building a unix c++ program that calls boost, but when i try to run it i get
error while loading shared libraries: libboost_filesystem.so.1.42.0: cannot open shared object file: No such file or directory.
I didn’t use to get this error before ( even though i was already calling boost ) , though i don’t know what triggered the change. Anyway – doing ldd on the binary, it indeed shows that the library is missing.
I guess the solution would be to add in the LD_LIBRARY_PATH a link to the library containing the .so file – but i can’t find it. Where should it be? Is this the right solution?
Note that i don’t have sudo privelages on my computer, so i can only change user settings – And also that i’m a linux newb so please try to explain simply…
I think the problem is that you have linked to a very specific version of Boost (1.42.0 in this case). This worked as long as Boost existed in that exact version on your system, but as soon as an update to a more recent version of Boost happened, the linked library could no longer be found.
You might want to adjust your Makefile to link to a more generic version of
libboost_filesystem.so.