title: How to force using local shared libraries over system libraries?
body: <p>How can I force using a local library over the system library in linux? </p>
  
  <p>I linked my executable explicitly to some .so files in my project/lib directory e.g. (../lib/libluajit.so).</p>
  
  <p>Running my executable under gdb or using ldd shows that it still uses the system libluajit-5.1.so.2</p>
  
  <p>I then set LD_LIBRARY_PATH to my project/lib directory and exported it, then ran my executable. Somehow it's still picking up the system library (confirmed by both gdb and ldd) </p>
  
  <p>I'd like to know how that's even possible, and what I can do to force it to use the local libluajit.so in my project/lib directory.</p>