0

I am developing an app on Netbeans, while I can run it. I can not debug or reun the test files. When I try to do so, I get:

./build/Debug/GNU-Linux-x86/tests/TestFiles/f1: error while loading shared libraries: libboost_thread.so.1.49.0: cannot open shared object file: No such file or directory

It tried including the library or the specific file with the debugging or testing session, but I continue to get that. Could there be an inconsistency with Netbeans?

Any ideas would be greatly appreciated!

Potney Switters
  • 2,902
  • 4
  • 33
  • 51
  • 1
    The application you attempt to run links Boost.Thread dynamically, but can't find this lib at run-time. Ensure that the lib exists on the the relevant search-paths. – Igor R. Jun 19 '12 at 17:14

1 Answers1

2

I assume your OS is Linux. It follows from your email that you have access to the copy of the libboost_thread.so.1.49.0 file. Let DIR be directory where this library exists.

If you do not have superuser on this computer, use method A. If you have superuser, use method A or method B.

Method A. Good for non-superuser or for superuser.

Let DIR be directory in which library libboost_thread.so.1.49.0 exists.

I assume you can start NetBeans from shell command line, not from GUI icon.

  • Quit NetBeans. Execute following command in bash:

    export LD_LIBRARY_PATH=DIR:$LD_LIBRARY_PATH
    
  • start netbeans from command line

Eventually, you will want to put the export command into your ~/.bashrc file.

Method B. Good only for superuser.

If you have superuser, use one the following methods to place the missing library into /usr/lib or /lib:

(1) install boost from rpm or apt or whatever packaging your linux system has, or

(2) install boost from sources with --prefix=/usr, or

(3) copy the mentioned library to /usr/lib. If you have to use #3, be careful about symlinks. Copy using "cp -a" and copy all files beginning libboost_thread.so*, like

    cp -a DIR/libboost_thread.so* /usr/lib
Andrei
  • 8,606
  • 10
  • 35
  • 43
  • I followed the (3). I had no idea where should point to. So /usr/lib is what netbeans goes through in order to check for c++ .so files. In general C++ libs(?) Great and very descriptive answer. – Potney Switters Jun 20 '12 at 18:53