0

I have created a c++ app that needs libboost_iostreams.so.1.63.0 library. In a Ubuntu 16.04 VM I have built the library and the ldd command on my executable gives the following:

ldd ./c++_app | grep boost

libboost_iostreams.so.1.63.0 => /usr/local/lib/libboost_iostreams.so.1.63.0 (0x00007f7a52e62000)

Then I zip the app with the relevant shared lib in order to install it on new VM which has not the boost 1.63 library built.
I install the c++ on /usr/bin and the library on a folder lib in /usr/share-data and then update the /etc/ld.so.conf so that it can find the new library
However when I give:

 sudo ldconfig -p | grep boost

I get

 libboost_iostreams.so.1.63.0 (libc6,x86-64) => /usr/share/lib/libboost_iostreams.so.1.63.0

but when I give ldd on the binary file in /usr/bin I get

ldd c++_app | grep boost
libboost_iostreams.so.1.62.0 => not found

What I have done wrong here?

dk13
  • 1,461
  • 4
  • 20
  • 47

1 Answers1

0

Try export LD_LIBRARY_PATH=/usr/share/lib. This should help you

Louis Kröger
  • 344
  • 3
  • 10
  • I did it but the same problem which results in error "while loading shared libraries: libboost_iostreams.so.1.62.0: cannot open shared object file: No such file or directory" when I try to run my app – dk13 Dec 04 '17 at 12:28