Ubuntu18.04安装opencv出现的一系列问题解决方法(持续更新~)

$ sudo make 出现以下问题

1、this file requires compiler and library support for the iso c++ 2011 standard

解决方法:在工程主目录的CMakeLists.txt中添加如下,可以编译成功:

SET( CMAKE_CXX_FLAGS "-std=c++11 -O3")

2、~/opencv_contrib/modules/xfeatures2d/src/boostdesc.cpp:673:20: fatal error: boostdesc_bgm.i: No such file or directory

解决方法:打开以下网页:https://github.com/opencv/opencv_contrib/issues/1301,

直接拉到后面 ,看到BenbenIO这个人回答的一系列链接,直接鼠标移到链接,右键把链接保存下来,放到opencv_contrib/modules/xfeatures2d/src/ 路径下即可。

总共缺了以下几个文件,都需要拷贝:

  •     boostdesc_bgm.i
  •     boostdesc_bgm_bi.i
  •     boostdesc_bgm_hd.i
  •     boostdesc_lbgm.i
  •     boostdesc_binboost_064.i
  •     boostdesc_binboost_128.i
  •     boostdesc_binboost_256.i
  •     vgg_generated_120.i
  •     vgg_generated_64.i
  •     vgg_generated_80.i
  •     vgg_generated_48.i

然后再sudo make就可以编译成功了!

发布了139 篇原创文章 · 获赞 49 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/xiewenrui1996/article/details/103895010