the libopencv-dev could not installed on my tx2

i want to configure caffe on my jetson tx2,and i installed some packages on tx2 at first.
i followed the a article from the internet,when i inputed the command :sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
the error were shown:

Reading package lists… Done
Building dependency tree
Reading state information… Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
libopencv-dev : Depends: libopencv-core-dev (=
Depends: libopencv-ml-dev (=
Depends: libopencv-imgproc-dev (=
Depends: libopencv-video-dev (=
Depends: libopencv-objdetect-dev (=
Depends: libopencv-highgui-dev (=
Depends: libopencv-calib3d-dev (=
Depends: libopencv-flann-dev (=
Depends: libopencv-features2d-dev (=
Depends: libopencv-legacy-dev (=
Depends: libopencv-contrib-dev (=
Depends: libopencv-ts-dev (=
Depends: libopencv-photo-dev (=
Depends: libopencv-videostab-dev (=
Depends: libopencv-stitching-dev (=
Depends: libopencv-gpu-dev (=
Depends: libopencv-superres-dev (=
Depends: libopencv-ocl-dev (= but it is not going to be installed
Depends: libopencv2.4-java (= but it is not going to be installed
Depends: libopencv2.4-jni (= but it is not going to be installed
Depends: libcv-dev (=
Depends: libhighgui-dev (=
Depends: libcvaux-dev (=

can i use the apt-get -f install command ?

You can build caffe without opencv. You’ll need to make sure your images are input in a format it can read without opencv, and you will have to view the output using stand-alone viewers, but that works OK.


Just verified caffe on JetPack3.0, it works properly.
Here is our installation steps:

1. Flash TX2 via JetPack (including cuda, opencv4tegra, cuDNN)

2. Pre-required

sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe 
sudo add-apt-repository multiverse
sudo apt-get install libboost-dev libboost-all-dev
sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev libatlas-base-dev liblmdb-dev libblas-dev libatlas-base-dev libprotobuf-dev libleveldb-dev libsnappy-dev libhdf5-serial-dev protobuf-compiler python-numpy

3. Source

export CAFFE_ROOT=~/caffe
git clone $CAFFE_ROOT

Apply change

diff --git a/Makefile b/Makefile
index 4d32416..ad173f8 100644
--- a/Makefile
+++ b/Makefile
@@ -178,7 +178,7 @@ ifneq ($(CPU_ONLY), 1)
        LIBRARIES := cudart cublas curand
-LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_hl hdf5
+LIBRARIES += glog gflags protobuf boost_system boost_filesystem m hdf5_serial_hl hdf5_serial
 # handle IO dependencies
diff --git a/Makefile.config.example b/Makefile.config.example
index d552b38..037e452 100644
--- a/Makefile.config.example
+++ b/Makefile.config.example
@@ -2,7 +2,7 @@
 # Contributions simplifying and improving our build system are welcome!
 # cuDNN acceleration switch (uncomment to build with cuDNN).
-# USE_CUDNN := 1
 # CPU-only switch (uncomment to build without GPU support).
 # CPU_ONLY := 1
@@ -39,6 +39,7 @@ CUDA_ARCH := -gencode arch=compute_20,code=sm_20 \
                -gencode arch=compute_35,code=sm_35 \
                -gencode arch=compute_50,code=sm_50 \
                -gencode arch=compute_52,code=sm_52 \
+               -gencode arch=compute_53,code=sm_53 \
                -gencode arch=compute_60,code=sm_60 \
                -gencode arch=compute_61,code=sm_61 \
                -gencode arch=compute_61,code=compute_61
@@ -91,7 +92,7 @@ PYTHON_LIB := /usr/lib
 # Whatever else you find you need goes here.
-INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include
+INCLUDE_DIRS := $(PYTHON_INCLUDE) /usr/local/include /usr/include/hdf5/serial/
 LIBRARY_DIRS := $(PYTHON_LIB) /usr/local/lib /usr/lib
 # If Homebrew is installed at a non standard location (for example your home directory) and you use it for general dependencies

4. Build

cp Makefile.config.example Makefile.config
make -j4
make pycaffe

If not already present, it would make sense for TX2 to add also this in Makefile.config.example :

-gencode arch=compute_62,code=compute_62

Thanks Honey.

Yes, sorry for the misleading.

For tx1, please add

-gencode arch=compute_53,code=sm_53

For tx2, please add

-gencode arch=compute_62,code=sm_62

I want to use OpenCV 3.2.0 in Caffe, and change the Makefile.config. But when do the make, one error come out:

fatal error opencv2/core/core.hpp no such file or directory

Any help???