Solve the source code compilation error m of Ubuntu 16.04 + opencv4.1 akefile:160 : recipe for target ‘all’ failed

Geeks, please accept the hero post of 2021 Microsoft x Intel hacking contest>>>

Recently, opencv source code compilation, the following error

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

After Googling, I realized that after Anaconda was installed, both Python and GCC used Anaconda version. Anaconda’s GCC version is lower than system defalut’s version

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

solutions:

1. Annotate the environment variable of Anaconda in shell first

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

2. Cmake add options

-D WITH_OPENMP=ON

Similar Posts: