尝试在树莓派pi3上安装opencv 3.1.0,但我一直收到此错误消息

时间:2019-07-11 17:40:33

标签: python-2.7 raspberry-pi3 opencv3.1

我正在尝试在raspberry pi 3上安装opencv 3.1.0,它给了我这个错误消息。

我是树莓派,python和opencv的新手。我尝试将错误消息复制并粘贴到浏览器中,以查看是否出现任何类似的问题,但找不到任何解决方案。我正在从这段YouTube视频https://www.youtube.com/watch?v=Gt8BPPtHHk4&feature=youtu.be中复制此代码。

pi@raspberrypi:~/opencv-3.1.0/build $ sudo make
[  2%] Built target libtiff
[  5%] Built target libjpeg
[  9%] Built target libwebp
[ 11%] Built target libjasper
[ 16%] Built target IlmImf
[ 16%] Generating opencv_imgproc_pch_dephelp.cxx
Scanning dependencies of target opencv_imgproc_pch_dephelp
[ 16%] Building CXX object modules/imgproc/CMakeFiles/opencv_imgproc_pch_dephelp.dir/opencv_imgproc_pch_dephelp.cxx.o
[ 16%] Linking CXX static library ../../lib/libopencv_imgproc_pch_dephelp.a
[ 16%] Built target opencv_imgproc_pch_dephelp
Scanning dependencies of target pch_Generate_opencv_imgproc
[ 16%] Generating precomp.hpp
[ 16%] Generating precomp.hpp.gch/opencv_imgproc_RELEASE.gch
[ 16%] Built target pch_Generate_opencv_imgproc
[ 16%] Built target opencv_core_pch_dephelp
[ 16%] Generating precomp.hpp.gch/opencv_core_RELEASE.gch
In file included from /usr/include/c++/8/bits/stl_algo.h:59,
                 from /usr/include/c++/8/algorithm:62,
                 from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/base.hpp:53,
                 from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core.hpp:54,
                 from /home/pi/opencv-3.1.0/modules/core/include/opencv2/core/utility.hpp:52,
                 from /home/pi/opencv-3.1.0/build/modules/core/precomp.hpp:49:
/usr/include/c++/8/cstdlib:75:15: fatal error: stdlib.h: No such file or directory
 #include_next <stdlib.h>
               ^~~~~~~~~~
compilation terminated.
make[2]: *** [modules/core/CMakeFiles/pch_Generate_opencv_core.dir/build.make:64: modules/core/precomp.hpp.gch/opencv_core_RELEASE.gch] Error 1
make[1]: *** [CMakeFiles/Makefile2:1703: modules/core/CMakeFiles/pch_Generate_opencv_core.dir/all] Error 2
make: *** [Makefile:163: all] Error 2

0 个答案:

没有答案