环境配置:Ubuntu16.04,cuda 9.0,cudnn 7.0
报错:
LD -o .build_release/lib/libcaffe.so.1.0.0
/usr/bin/ld: 找不到 -lopencv_imgcodecs
collect2: error: ld returned 1 exit status
Makefile:572: recipe for target '.build_release/lib/libcaffe.so.1.0.0' failed
make: *** [.build_release/lib/libcaffe.so.1.0.0] Error 1
解决方法:
1.打开Makefile.config文件
sudo gedit Makefile.config
2.修改关于OpenCV部分的代码段
# uncomment to disable IO dependencies and corresponding data layers
USE_OPENCV := 1
# USE_LEVELDB := 0
# USE_LMDB := 0
# Uncomment if you're using OpenCV 3
# OPENCV_VERSION := 3
3.保存再次编译
make all -j8