Error installing caffe

I’ve been trying to follow the tutorial jetson-inference, but my caffe installation has errors now. I installed all the prereq and dependencies, but in the cmake section I’m stuck at “make all”:

[ 1%] Built target proto
[ 1%] Linking CXX shared library …/…/lib/libcaffe-nv.so
/usr/bin/ld: cannot find -lopencv_dep_cudart
collect2: error: ld returned 1 exit status
src/caffe/CMakeFiles/caffe.dir/build.make:31425: recipe for target ‘lib/libcaffe-nv.so.0.15.14’ failed
make[2]: *** [lib/libcaffe-nv.so.0.15.14] Error 1
CMakeFiles/Makefile2:272: recipe for target ‘src/caffe/CMakeFiles/caffe.dir/all’ failed
make[1]: *** [src/caffe/CMakeFiles/caffe.dir/all] Error 2
Makefile:127: recipe for target ‘all’ failed
make: *** [all] Error 2

Any help is appreciated!

David Huang

Hi,

Suppose you are setting a training environment on an x86 Linux machine.
Here is an automatic script to install NvCaffe for your reference:

Please remember that the Caffe installation mentioned here is for a x86 Linux Host:
[url]https://github.com/dusty-nv/jetson-inference#installing-nvcaffe-on-the-host[/url]

Thanks.

Thanks for the reply!

When I followed the link, I installed all prereq. without any problems but got an error at ‘cmake …’:

OpenCV ARCH:
– OpenCV RUNTIME:
– OpenCV STATIC: OFF
CMake Warning at /home/shuo/OpenCV/cmake/OpenCVConfig.cmake:166 (message):
Found OpenCV Windows Pack but it has no binaries compatible with your
configuration.

You should manually point CMake variable OpenCV_DIR to your build of OpenCV
library.
Call Stack (most recent call first):
cmake/Dependencies.cmake:74 (find_package)
CMakeLists.txt:58 (include)

CMake Error at cmake/Dependencies.cmake:74 (find_package):
Found package configuration file:

/home/shuo/OpenCV/cmake/OpenCVConfig.cmake

but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be
NOT FOUND.
Call Stack (most recent call first):
CMakeLists.txt:58 (include)

– Configuring incomplete, errors occurred!

However I already installed OpenCV 3.2 and ran the tests, all passed. So I think my OpenCV is working. Thanks!

Good! Thanks for updating status with us.