简体   繁体   中英

fatal error: opencv2/core/core.hpp caffe framework installation

I'm trying to install Caffe framework with this script: https://gist.github.com/jetsonhacks/acf63b993b44e1fb9528 and I'm getting opencv2/core/core.hpp error.

CXX src/caffe/layers/data_layer.cpp
src/caffe/layers/data_layer.cpp:2:33: 
 fatal error: opencv2/core/core.hpp: No such file or directory
#include <opencv2/core/core.hpp>
                             ^
compilation terminated.
make: *** [.build_release/src/caffe/layers/data_layer.o] Error 1

In the documentation, OpenCV is optional. But that error tells me not. Does such include have nothing to do with OpenCV installation?

Installing opencv for python is not sufficient. You also need to do

sudo apt-get install libopencv-dev

I faced the same problem and solved it just by installing OpenCV. You will find other similar errors, unless you have installed all prerequisites.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM