caffe 错误总结 “/usr/bin/ld: 找不到 -lopencv_imgcodecs”

一、错误提示:/usr/bin/ld: 找不到 -lopencv_imgcodecs 或者 caffe cannot find lopencv_imgcodecs
二、原因:

  • opencv_imgcodecs is needed and available in opencv 3.0+.
    You don’t need to link it if using version 2.4.11.
    Please refer to line 200-205 in Makefile
    在这里插入图片描述

三、解决方法:

  • opencv_imgcodecs 是 opencv 3.0+的类包,但你使用的是opencv 2.+版本,版本不匹配,所以你要修改Makefile文件
  • Makefile.config 文件(Makefile与Makefile.config不是同一个文件)的 OPENCV_VERSION := 3 要注释带掉。

猜你喜欢

转载自blog.csdn.net/xw2017/article/details/85230744