解決 Ubuntu16.04 + opencv4.1 源碼編譯錯誤 Makefile:160: recipe for target 'all' failed

 

最近源碼編譯 opencv,出現下面的錯誤python

[ 60%] Built target opencv_dnn Makefile:160: recipe for target 'all' failed make: *** [all] Error 2

 

google 一下,才知道原來是安裝了 Anaconda 後,python 和 gcc 都用的是 anaconda 的版本,anaconda 的 gcc 版本,比 system defalut 的版本低linux

參考:https://stackoverflow.com/questions/40322301/compile-opencv-3-on-ubuntu-16-04-linking-error-usr-lib-x86-64-linux-gnu-libsoxshell

 

解決方案:ubuntu

 

1. 在 shell 中先註釋 Anaconda 的環境變量ui

# export PATH=~/anaconda3/bin:$PATH

 

2. cmake 添加選項google

-D WITH_OPENMP=ON
相關文章
相關標籤/搜索