title: libcudart.so.7.5: cannot open shared object file:No such file or directory
body: <p>I was trying to compile darknet(YOLO) with Cuda and Opencv. I compiled them and there is no error but there is warning like this :</p>
  
  <pre><code>/usr/bin/ld: warning: libcudart.so.7.5, needed by /usr/local/lib/libopencv_core.so, not found (try using -rpath or -rpath-link)    
  </code></pre>
  
  <p>When I try with the example from <a href="https://pjreddie.com/darknet/yolo/" rel="nofollow noreferrer">https://pjreddie.com/darknet/yolo/</a>, an error come out.</p>
  
  <pre><code>./darknet: error while loading shared libraries: libcudart.so.7.5: cannot open shared object file: No such file or directory
  </code></pre>
  
  <p>I don't know how to solve this.</p>
  
  <p>Below is my system</p>
  
  <pre><code>OS = Ubuntu 16.04 LTS
  CUDA = 8.0
  OPENCV = 2.4
  </code></pre>
  
  <p>Typing <code>nvcc -V</code> on terminal result with this </p>
  
  <pre><code>nvcc: NVIDIA (R) Cuda compiler driver
  Copyright (c) 2005-2016 NVIDIA Corporation
  Built on Sun_Sep__4_22:14:01_CDT_2016
  Cuda compilation tools, release 8.0, V8.0.44
  </code></pre>
  
  <p>I installed opencv using this command like shown from <a href="http://milq.github.io/install-opencv-ubuntu-debian/" rel="nofollow noreferrer">http://milq.github.io/install-opencv-ubuntu-debian/</a></p>
  
  <pre><code>sudo apt-get install libopencv-dev python-opencv
  </code></pre>
  
  <p>I did use option two from the page but during <code>make</code> process, it return the following error</p>
  
  <pre><code>modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/build.make:2982: recipe for target 'modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/graphcuts.cpp.o' failed
  make[2]: *** [modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/src/graphcuts.cpp.o] Error 1
  CMakeFiles/Makefile2:16054: recipe for target 'modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/all' failed
  make[1]: *** [modules/cudalegacy/CMakeFiles/opencv_cudalegacy.dir/all] Error 2
  make[1]: *** Waiting for unfinished jobs....
  [ 59%] Linking CXX shared library ../../lib/libopencv_photo.so
  [ 59%] Built target opencv_photo
  Makefile:160: recipe for target 'all' failed
  make: *** [all] Error 2
  </code></pre>
  
  <p>I already put the path for cuda inside <code>.bashrc</code> and reload it but the same error appears.
  Below is the path for cuda inside my <code>.bashrc</code></p>
  
  <pre><code>export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/cuda/lib64"
  export CUDA_HOME=/usr/local/cuda
  export PATH=${CUDA_HOME}/bin:${PATH}
  </code></pre>
  
  <p>Thank you for your help.</p>