Ошибки при загрузке OpenCV в Ubuntu

Я следовал этим инструкциям, чтобы загрузить OpenCV 3.1.0:

http://www.pyimagesearch.com/2015/06/22/install-opencv-3-0-and-python-2-7-on-ubuntu/

Однако после запуска команды make -j4 код обрабатывается до 14%, вывод выглядит следующим образом, выдавая ошибку о фатальной ошибке math.h...

[  0%] Built target opencv_hal_pch_dephelp
[  0%] Built target opencv_core_pch_dephelp
[  0%] Built target opencv_test_core_pch_dephelp
[  0%] Built target opencv_perf_core_pch_dephelp
[  0%] Built target opencv_imgproc_pch_dephelp
[  0%] Built target opencv_highgui_pch_dephelp
[  0%] Built target opencv_videoio_pch_dephelp
[  0%] Built target pch_Generate_opencv_test_core
[  0%] Built target opencv_imgcodecs_pch_dephelp
[  0%] Built target opencv_ts_pch_dephelp
[  0%] Built target pch_Generate_opencv_perf_core
[  0%] Built target opencv_test_flann_pch_dephelp
[  0%] Built target opencv_flann_pch_dephelp
[  0%] Built target opencv_test_imgproc_pch_dephelp
[  0%] Built target opencv_ml_pch_dephelp
[  0%] Built target opencv_perf_imgproc_pch_dephelp
[  0%] Built target opencv_photo_pch_dephelp
[  0%] Built target opencv_test_ml_pch_dephelp
[  0%] Built target opencv_test_photo_pch_dephelp
[  0%] Built target opencv_perf_photo_pch_dephelp
[  1%] Built target opencv_reg_pch_dephelp
[  1%] Built target opencv_perf_reg_pch_dephelp
[  1%] Built target opencv_test_reg_pch_dephelp
[  1%] Built target opencv_surface_matching_pch_dephelp
[  1%] Built target opencv_video_pch_dephelp
[  1%] Built target opencv_perf_video_pch_dephelp
[  2%] Built target opencv_test_viz_pch_dephelp
[  2%] Built target opencv_test_video_pch_dephelp
[  2%] Built target opencv_face_pch_dephelp
[  2%] Built target opencv_viz_pch_dephelp
[  2%] Built target opencv_perf_imgcodecs_pch_dephelp
[  2%] Built target opencv_test_imgcodecs_pch_dephelp
[  2%] Built target opencv_shape_pch_dephelp
[  2%] Built target opencv_test_shape_pch_dephelp
[  2%] Built target opencv_test_videoio_pch_dephelp
[  2%] Built target opencv_test_highgui_pch_dephelp
[  2%] Built target opencv_perf_videoio_pch_dephelp
[  3%] Built target opencv_objdetect_pch_dephelp
[  4%] Built target opencv_perf_objdetect_pch_dephelp
[  4%] Built target opencv_optflow_pch_dephelp
[  4%] Built target opencv_test_objdetect_pch_dephelp
[  4%] Built target opencv_superres_pch_dephelp
[  6%] Built target opencv_test_optflow_pch_dephelp
[  6%] Built target opencv_test_superres_pch_dephelp
[  6%] Built target opencv_tracking_pch_dephelp
[  6%] Built target opencv_perf_superres_pch_dephelp
[  6%] Built target opencv_test_tracking_pch_dephelp
[  6%] Built target opencv_perf_tracking_pch_dephelp
[  6%] Built target opencv_ximgproc_pch_dephelp
[  7%] Built target opencv_test_ximgproc_pch_dephelp
[  7%] Built target opencv_perf_ximgproc_pch_dephelp
[  7%] Built target opencv_xobjdetect_pch_dephelp
[  7%] Built target opencv_test_xphoto_pch_dephelp
[  7%] Built target opencv_bgsegm_pch_dephelp
[  7%] Built target opencv_bioinspired_pch_dephelp
[  7%] Built target opencv_test_bgsegm_pch_dephelp
[  8%] Built target opencv_test_bioinspired_pch_dephelp
[  9%] Built target opencv_perf_bioinspired_pch_dephelp
[  9%] Built target opencv_perf_features2d_pch_dephelp
[ 10%] Built target opencv_features2d_pch_dephelp
[ 10%] Built target opencv_test_features2d_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_perf_features2d
[ 10%] Built target opencv_latentsvm_pch_dephelp
[ 10%] Generating perf_precomp.hpp
[ 10%] Generating perf_precomp.hpp.gch/opencv_perf_features2d_RELEASE.gch
[ 10%] Built target opencv_perf_latentsvm_pch_dephelp
[ 10%] Built target opencv_test_latentsvm_pch_dephelp
[ 10%] Built target opencv_test_line_descriptor_pch_dephelp
[ 10%] Built target opencv_line_descriptor_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_test_line_descriptor
[ 10%] Generating test_precomp.hpp
[ 10%] Generating test_precomp.hpp.gch/opencv_test_line_descriptor_RELEASE.gch
[ 10%] Built target pch_Generate_opencv_perf_features2d
[ 10%] Built target opencv_perf_line_descriptor_pch_dephelp
[ 10%] Built target opencv_saliency_pch_dephelp
[ 10%] Built target opencv_text_pch_dephelp
[ 10%] Built target opencv_test_calib3d_pch_dephelp
[ 10%] Built target opencv_calib3d_pch_dephelp
[ 10%] Built target opencv_perf_calib3d_pch_dephelp
[ 10%] Built target opencv_ccalib_pch_dephelp
[ 10%] Built target opencv_rgbd_pch_dephelp
[ 10%] Built target opencv_test_rgbd_pch_dephelp
[ 10%] Built target opencv_videostab_pch_dephelp
[ 12%] Built target opencv_xfeatures2d_pch_dephelp
[ 12%] Built target pch_Generate_opencv_test_line_descriptor
[ 12%] Built target opencv_test_xfeatures2d_pch_dephelp
[ 12%] Built target opencv_perf_xfeatures2d_pch_dephelp
[ 12%] Built target opencv_test_stitching_pch_dephelp
[ 13%] Built target opencv_perf_stitching_pch_dephelp
[ 14%] Built target opencv_stitching_pch_dephelp
[ 14%] Built target pch_Generate_opencv_hal
[ 14%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
In file included from /home/sciencefair/opencv/modules/hal/include/opencv2/hal/defs.h:329:0,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core/cvdef.h:59,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core.hpp:52,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core/utility.hpp:52,
                 from /home/sciencefair/opencv/build/modules/core/precomp.hpp:49:
/usr/include/c++/6/cmath:45:23: fatal error: math.h: No such file or directory
 #include_next <math.h>
                       ^
compilation terminated.
modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch' failed
make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1
CMakeFiles/Makefile2:1875: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 14%] Built target pch_Generate_opencv_highgui
Makefile:149: recipe for target 'all' failed
make: *** [all] Error 2
sciencefair@sciencefair-Vir

Любые идеи? Заранее спасибо.

ОБНОВЛЕНИЕ: я добавил math.h в PATH, и эта ошибка исчезла. Однако теперь я получаю сообщение об ошибке с stdlib.h. Вывод выглядит так.

    [  0%] Built target opencv_core_pch_dephelp
[  0%] Built target opencv_imgproc_pch_dephelp
[  0%] Built target opencv_perf_core_pch_dephelp
[  0%] Built target opencv_imgcodecs_pch_dephelp
[  0%] Built target opencv_test_core_pch_dephelp
[  0%] Built target opencv_videoio_pch_dephelp
[  0%] Built target opencv_ts_pch_dephelp
[  1%] Built target opencv_highgui_pch_dephelp
[  1%] Built target pch_Generate_opencv_perf_core
[  1%] Built target opencv_test_flann_pch_dephelp
[  1%] Built target opencv_flann_pch_dephelp
[  1%] Built target opencv_hdf_pch_dephelp
[  1%] Built target opencv_test_imgproc_pch_dephelp
[  1%] Built target opencv_test_ml_pch_dephelp
[  1%] Built target opencv_perf_imgproc_pch_dephelp
[  1%] Built target opencv_ml_pch_dephelp
[  1%] Built target opencv_perf_photo_pch_dephelp
[  1%] Built target opencv_photo_pch_dephelp
[  1%] Built target opencv_test_photo_pch_dephelp
[  1%] Built target opencv_reg_pch_dephelp
[  2%] Built target opencv_test_reg_pch_dephelp
[  2%] Built target opencv_perf_reg_pch_dephelp
[  2%] Built target opencv_surface_matching_pch_dephelp
[  2%] Built target opencv_video_pch_dephelp
[  2%] Built target opencv_test_video_pch_dephelp
[  2%] Built target opencv_perf_video_pch_dephelp
[  2%] Built target opencv_test_viz_pch_dephelp
[  2%] Built target opencv_viz_pch_dephelp
[  2%] Built target opencv_dnn_pch_dephelp
[  2%] Built target opencv_test_dnn_pch_dephelp
[  3%] Built target libprotobuf
[  3%] Built target opencv_fuzzy_pch_dephelp
[  3%] Built target opencv_test_imgcodecs_pch_dephelp
[  3%] Built target opencv_test_fuzzy_pch_dephelp
[  3%] Built target opencv_perf_imgcodecs_pch_dephelp
[  3%] Built target opencv_test_shape_pch_dephelp
[  3%] Built target opencv_shape_pch_dephelp
[  3%] Built target opencv_test_videoio_pch_dephelp
[  3%] Built target opencv_perf_objdetect_pch_dephelp
[  3%] Built target opencv_test_objdetect_pch_dephelp
[  3%] Built target opencv_test_highgui_pch_dephelp
[  3%] Built target opencv_perf_videoio_pch_dephelp
[  3%] Built target opencv_objdetect_pch_dephelp
[  3%] Built target opencv_test_superres_pch_dephelp
[  3%] Built target opencv_superres_pch_dephelp
[  5%] Built target opencv_plot_pch_dephelp
[  5%] Built target opencv_perf_superres_pch_dephelp
[  5%] Built target opencv_xobjdetect_pch_dephelp
[  5%] Built target opencv_test_xphoto_pch_dephelp
[  5%] Built target opencv_perf_xphoto_pch_dephelp
[  5%] Built target opencv_bgsegm_pch_dephelp
[  5%] Built target opencv_test_bioinspired_pch_dephelp
[  5%] Built target opencv_bioinspired_pch_dephelp
[  5%] Built target opencv_test_bgsegm_pch_dephelp
[  6%] Built target opencv_perf_bioinspired_pch_dephelp
[  6%] Built target opencv_dpm_pch_dephelp
[  7%] Built target opencv_face_pch_dephelp
[  8%] Built target opencv_features2d_pch_dephelp
[ 10%] Built target opencv_perf_features2d_pch_dephelp
[ 10%] Built target opencv_test_features2d_pch_dephelp
[ 10%] Built target opencv_test_line_descriptor_pch_dephelp
[ 10%] Built target opencv_line_descriptor_pch_dephelp
[ 10%] Built target opencv_perf_line_descriptor_pch_dephelp
[ 10%] Built target opencv_calib3d_pch_dephelp
[ 11%] Built target opencv_saliency_pch_dephelp
[ 12%] Built target opencv_text_pch_dephelp
[ 12%] Built target opencv_ccalib_pch_dephelp
[ 12%] Built target opencv_test_calib3d_pch_dephelp
[ 12%] Built target opencv_perf_calib3d_pch_dephelp
[ 13%] Built target opencv_rgbd_pch_dephelp
[ 13%] Built target opencv_test_rgbd_pch_dephelp
[ 15%] Built target opencv_perf_stereo_pch_dephelp
[ 16%] Built target opencv_stereo_pch_dephelp
[ 16%] Built target opencv_structured_light_pch_dephelp
[ 16%] Built target opencv_test_stereo_pch_dephelp
[ 16%] Built target opencv_test_structured_light_pch_dephelp
[ 16%] Built target opencv_tracking_pch_dephelp
[ 16%] Built target opencv_perf_tracking_pch_dephelp
[ 16%] Built target opencv_test_tracking_pch_dephelp
[ 16%] Built target opencv_videostab_pch_dephelp
[ 16%] Built target opencv_perf_xfeatures2d_pch_dephelp
[ 16%] Built target opencv_perf_ximgproc_pch_dephelp
[ 16%] Built target opencv_xfeatures2d_pch_dephelp
[ 16%] Built target opencv_test_ximgproc_pch_dephelp
[ 16%] Built target opencv_test_xfeatures2d_pch_dephelp
[ 16%] Built target opencv_ximgproc_pch_dephelp
[ 16%] Built target opencv_test_aruco_pch_dephelp
[ 17%] Built target opencv_aruco_pch_dephelp
[ 17%] Built target opencv_optflow_pch_dephelp
[ 17%] Built target opencv_test_optflow_pch_dephelp
[ 17%] Built target opencv_stitching_pch_dephelp
[ 17%] Built target opencv_test_stitching_pch_dephelp
[ 17%] Built target opencv_perf_stitching_pch_dephelp
[ 17%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
Scanning dependencies of target pch_Generate_opencv_imgproc
Scanning dependencies of target pch_Generate_opencv_imgcodecs
[ 17%] Generating precomp.hpp
[ 17%] Built target pch_Generate_opencv_test_core
[ 17%] Generating precomp.hpp
Scanning dependencies of target pch_Generate_opencv_videoio
[ 17%] Generating precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core/base.hpp:53,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core.hpp:54,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core/utility.hpp:52,
                 from /home/sciencefair/opencv/build/modules/core/precomp.hpp:49:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
[ 17%] Generating precomp.hpp.gch/opencv_imgproc_RELEASE.gch
modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:62: recipe for target 'modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch' failed
make[2]: *** [modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1
CMakeFiles/Makefile2:1887: recipe for target 'modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all' failed
make[1]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 17%] Generating precomp.hpp
[ 17%] Generating precomp.hpp.gch/opencv_videoio_RELEASE.gch
In file included from /usr/include/c++/6/bits/stl_algo.h:59:0,
                 from /usr/include/c++/6/algorithm:62,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core/base.hpp:53,
                 from /home/sciencefair/opencv/modules/core/include/opencv2/core.hpp:54,
                 from /home/sciencefair/opencv/modules/imgcodecs/include/opencv2/imgcodecs.hpp:46,
                 from /home/sciencefair/opencv/build/modules/imgcodecs/precomp.hpp:45:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
                         ^
compilation terminated.
modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/build.make:62: recipe for target 'modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch' failed
make[2]: *** [modules/imgcodecs/precomp.hpp.gch/opencv_imgcodecs_RELEASE.gch] Error 1
CMakeFiles/Makefile2:5875: recipe for target 'modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all' failed
make[1]: *** [modules/imgcodecs/CMakeFiles/pch_Generate_opencv_imgcodecs.dir/all] Error 2
[ 17%] Built target pch_Generate_opencv_imgproc
[ 17%] Built target pch_Generate_opencv_videoio
Makefile:160: recipe for target 'all' failed
make: *** [al

л] Ошибка 2

Любые идеи? Спасибо!

ДРУГОЕ ОБНОВЛЕНИЕ: я следовал этим инструкциям http://rodrigoberriel.com/2014/10/installing-opencv-3-0-0-on-ubuntu-14-04/, в котором требуется запустить файл sh, который они предоставляют. Однако ошибки продолжают сохраняться с stdlib.h. Я много раз проверял, что stdlib.h является переменной среды и что stdlib.h существует в usr/include. Файл sh выглядит следующим образом...

    #!/bin/bash

###########################################################
#
# OpenCV 3.0.0 alpha - instalação
# http://opencv.org/
#
###########################################################

#----------------------------------------------------------
# Criando um logger para registrar a instalação
#----------------------------------------------------------
# Tempo: início
dateformat="+%a %b %-eth %Y %I:%M:%S %p %Z"
starttime=$(date "$dateformat")
starttimesec=$(date +%s)

# Pega o diretório atual
curdir=$(cd `dirname $0` && pwd)

# Cria o arquivo onde as ações ficarão registradas
logfile="$curdir/install-opencv.log"
rm -f $logfile

# Logger simples
log(){
    timestamp=$(date +"%Y-%m-%d %k:%M:%S")
    echo "\n$timestamp $1"
    echo "$timestamp $1" >> $logfile 2>&1
}

# Iniciando a instalação do OpenCV 3.0.0
log "Iniciando a instalação do OpenCV 3.0.0"


#----------------------------------------------------------
# Assegurando um ambiente atualizado
#----------------------------------------------------------

# Informa ao usuário a próxima ação
log "Executando apt-get update e apt-get upgrade"

# Executa a ação
sudo apt-get update
sudo apt-get upgrade


#----------------------------------------------------------
# Instalando os pacotes das dependências
#----------------------------------------------------------

log "Instalando as dependências"

# Executa a ação
sudo apt-get -y install libopencv-dev build-essential cmake git libgtk2.0-dev pkg-config python-dev python-numpy libdc1394-22 libdc1394-22-dev libjpeg-dev libpng12-dev libtiff4-dev libjasper-dev libavcodec-dev libavformat-dev libswscale-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev libtbb-dev libqt4-dev libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev x264 v4l-utils unzip


#----------------------------------------------------------
# Instalando OpenCV
#----------------------------------------------------------

log "Baixando a biblioteca OpenCV 3.0.0"

# Definição de constante
FOLDER_NAME="opencv"

# Cria um novo diretório para armazenar o código-fonte
mkdir ${FOLDER_NAME}

# Entra no diretório
cd ${FOLDER_NAME}

# Baixa o código-fonte
wget https://github.com/Itseez/opencv/archive/3.0.0-alpha.zip -O opencv-3.0.0-alpha.zip

# Extrai o conteúdo
unzip opencv-3.0.0-alpha.zip

log "Instalando a biblioteca OpenCV 3.0.0"

# Entra no diretório
cd opencv-3.0.0-alpha

# Cria um diretório chamado 'build'
mkdir build

# Entra no diretório
cd build

# Constrói o projeto usando CMake
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..

# Compila o projeto
make -j $(nproc)

# Instala as bibliotecas na pasta apropriada
sudo make install

# Adiciona o caminho das bibliotecas do OpenCV aos caminhos de pesquisa de biblioteca padrão do Ubuntu
sudo /bin/bash -c 'echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf'

# Atualiza os caminhos de pesquisa de biblioteca padrão do Ubuntu
sudo ldconfig

# Informa ao usuário que o OpenCV foi instalado com sucesso!
log "OpenCV 3.0.0 foi instalado com sucesso!"

#----------------------------------------------------------
# Mostra tempo gasto com a instalação
#----------------------------------------------------------

# Tempo: fim
endtime=$(date "$dateformat")
endtimesec=$(date +%s)

# Mostra tempo gasto com a instalação
elapsedtimesec=$(expr $endtimesec - $starttimesec)
ds=$((elapsedtimesec % 60))
dm=$(((elapsedtimesec / 60) % 60))
dh=$((elapsedtimesec / 3600))
displaytime=$(printf "%02d:%02d:%02d" $dh $dm $ds)
log "Tempo gasto: $displaytime\n"

person Rehaan Ahmad    schedule 15.11.2016    source источник


Ответы (2)


Проблема в отсутствующем файле math.h. make цели требуется cmath файл, который включает math.h (строка 45 в cmath) файла. Обычно вы найдете math.h в /usr/include/math.h.

Если это так, то просто для того, чтобы заставить его работать, вы можете добавить переменную окружения /usr/include в переменную окружения $PATH. Вы можете выполнить поиск в Интернете, чтобы добавить каталог в $PATH, или вы также можете проверить здесь.

Если это не так, вам нужно найти файл в системе и указать его путь к цели make.

person radbrawler    schedule 15.11.2016
comment
@rehaan-ahmad Если это не сработает, мне понадобятся дополнительные журналы ошибок. - person radbrawler; 15.11.2016
comment
Я добавил это к своему пути, и теперь ошибка math.h исчезла. Но теперь я получаю сообщение об ошибке stdlib.h. Я добавил stdlib к своему пути, однако ошибка сохраняется, теперь я обновил вопрос. - person Rehaan Ahmad; 16.11.2016
comment
Какой путь вы указали для stdlib ./ @rehaan-ahmad - person radbrawler; 16.11.2016
comment
Моя строка пути выглядит следующим образом, после этого я также выполнил команду экспорта. PATH=$HOME/bin:$HOME/.local/bin:$PATH:/usr/include/math.h:/usr/include/stdlib.h. @radbrawler - person Rehaan Ahmad; 16.11.2016
comment
сделай это PATH="$HOME/bin:$HOME/.local/bin:$PATH:/usr/include/ @reehan-ahmad - person radbrawler; 16.11.2016
comment
Ошибка все еще сохраняется. Есть ли что-то, что мне нужно сделать в терминале? Есть ли какие-либо другие детали, которые я должен предоставить? @radbrawler - person Rehaan Ahmad; 16.11.2016
comment
правильно ли настроен $PATH .. попробуйте echo $PATH и посмотрите, есть ли изменения.. какой ответ вы получите для echo $PATH .. - person radbrawler; 16.11.2016
comment
/usr/include:/usr/include/stdlib.h:/home/sciencefair/bin:/home/sciencefair/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin: /usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin @radbrawler - person Rehaan Ahmad; 16.11.2016
comment
до сих пор не работает .? У вас есть /usr/include/stdlib.h файл .? - person radbrawler; 16.11.2016
comment
Да, этот файл существует в этом каталоге @radbrawler - person Rehaan Ahmad; 17.11.2016
comment
есть еще один включаемый файл в usr/local/include, должен ли я поместить туда файл stdlib.h? - person Rehaan Ahmad; 17.11.2016
comment
Проблема по-прежнему в том, что make не может найти stdlib.h. я не знаю, какую переменную среды он проверяет. В большинстве случаев это только $PATH. Вы должны проверить учебник еще раз и убедиться, что вы следуете ему правильно. Вы проверили версию opencv и opencv_contrib или какую-либо информацию, которую вам может не хватать. Также, пожалуйста, скажите мне шаги, чтобы произвести его? @рихан-ахмад - person radbrawler; 17.11.2016

Что ж, это было долгое решение... Похоже, добавление переменной в PATH не было проблемой. Проблема была с G++ и GCC версии 6. Так что после перенаправления gcc и g++ на gcc и g++ версии 5 все заработало.

person Rehaan Ahmad    schedule 20.11.2016