title: Mongodb : error while loading shared libraries: libboost_thread.so.1.54.0: > cannot open shared object file: No such file or directory
body: <p>I am trying to connect MongoDb with Qt c++. When I build it there is no error, just information like;</p>
  
  <blockquote>
    <p>:-1: warning: libboost_system.so.1.54.0, needed by
    /usr/local/lib/libboost_thread.so, may conflict with
    libboost_system.so.5</p>
  </blockquote>
  
  <p>However when I tried to Run it says:</p>
  
  <blockquote>
    <p>error while loading shared libraries: libboost_thread.so.1.54.0:
    cannot open shared object file: No such file or directory</p>
  </blockquote>
  
  <p>Here is my small code sample which everything looks fine.</p>
  
  <pre><code>#include "mainwindow.h"
  #include "ui_mainwindow.h"
  
  #include &lt;QDebug&gt;
  #include &lt;mongo/client/dbclient.h&gt;
  
  
  MainWindow::MainWindow(QWidget *parent) :
      QMainWindow(parent),
      ui(new Ui::MainWindow)
  {
      ui-&gt;setupUi(this);
  
      try
      {
          mongo::DBClientConnection c;
          c.connect("localhost");
  
          qDebug() &lt;&lt; "Connected to Mongo";
      }
      catch (mongo::DBException &amp;e)
      {
          qDebug() &lt;&lt; "Cannot, Error : " &lt;&lt; e.what();
      }
  
  }
  
  MainWindow::~MainWindow()
  {
      delete ui;
  }
  </code></pre>
  
  <p>Could you please help me why I am getting this error and how to fix it ? </p>
  
  <p><strong>EDIT :</strong> </p>
  
  <p>Here is also my .pro file ; </p>
  
  <pre><code>QT       += core gui
  
  greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
  
  TARGET = mongodbtest
  TEMPLATE = app
  
  
  SOURCES += main.cpp\
          mainwindow.cpp
  
  HEADERS  += mainwindow.h
  
  FORMS    += mainwindow.ui
  
  INCLUDEPATH += /usr/local/lib/
  
  LIBS += -pthread \
      -lmongoclient \
      -lboost_thread \
      -lboost_system \
      -lboost_regex
  </code></pre>
  
  <p>and I see that I already have libboost_thread.so.1.54.0</p>
  
  <blockquote>
    <p>[mg@mg-CentOS mg]$ locate libboost_thread.so.1.54.0
    /usr/local/lib/libboost_thread.so.1.54.0</p>
  </blockquote>