简体   繁体   中英

when i am installing caffe in my ubuntu 16.04 ,i have issue with openCV

I was trying to install caffe in linux machine,and while i am trying to do make build ,i am getting an issue with openCV. I am getting the following error

/usr/bin/ld:cannot find -lopencv_imgcodecs
/usr/bin/ld:cannot find -lopencv_videoio
collect2:error:ld returned 1 exit status.

can anyone help me in resolve this issue?

This usually happens when you have either forgotten to uncomment line number 21(in my case) when you have opencv3 or if you have not checked the version properly.If opencv>=3.0 then in the makefile on line 181(in my case) add libraries like

LIBRARIES += glog gflags protobuf leveldb snappy \
  lmdb boost_system hdf5_hl hdf5 \
  opencv_core opencv_highgui opencv_imgproc opencv_imgcodecs

And also make sure to rebuild.

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