我正在尝试安装 OpenCV 3.1.0 库,运行后出现此错误make
:
In file included from /usr/include/c++/6/ext/string_conversions.h:41:0,
from /usr/include/c++/6/bits/basic_string.h:5402,
from /usr/include/c++/6/string:52,
from /usr/include/c++/6/bits/locale_classes.h:40,
from /usr/include/c++/6/bits/ios_base.h:41,
from /usr/include/c++/6/ios:42,
from /usr/include/c++/6/ostream:38,
from /home/alex/opencv/OpenCV/modules/ts/include/opencv2/ts/ts_gtest.h:55,
from /home/alex/opencv/OpenCV/modules/ts/include/opencv2/ts.hpp:28,
from /home/alex/opencv/OpenCV/build/modules/core/perf_precomp.hpp:12:
/usr/include/c++/6/cstdlib:75:25: fatal error: stdlib.h: No such file or directory
#include_next <stdlib.h>
我曾多次尝试(重新)安装不同版本libstdc++
,认为问题源于此,并且我仔细检查了所需的依赖项,但无济于事。
我也查看了文件夹,错误中提到的/usr/include/c++/6/
文件( )就在那里。stdlib.h
我还应该提到运行(之前make
):
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
给出失败的结果:
HAVE_C_FVISIBILITY_INLINES_HIDDEN
HAVE_C_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
HAVE_CXX_WNO_UNNAMED_TYPE_TEMPLATE_ARGS
HAVE_C_WNO_DELETE_NON_VIRTUAL_DTOR
HAVE_C_WSIGN_PROMO
HAVE_CXX_WSTRICT_PROTOTYPES
HAVE_CXX_WMISSING_PROTOTYPES
关于如何解决这个问题有什么建议吗?