ubuntu 16.04安装opencv出错

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
lintingting
帖子: 25
注册时间: 2016-11-18 13:21
系统: Ubuntu

ubuntu 16.04安装opencv出错

#1

帖子 lintingting » 2017-03-05 10:01

按照网上的教程编译安装opencv时,输入命令cmake -DCMAKE_BUILD_TYPE=RELEASE \
> -DCMAKE_INSTALL_PREFIX=/home/fanzong/anaconda2/envs/tensorflow \
> -DINSTALL_PYTHON_EXAMPLES=ON \
> -DINSTALL_C_EXAMPLES=OFF \
> -DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules \
> -DPYTHON_EXCUTABLE=/home/fanzong/anaconda2/envs/tensorflow/bin/python \
> -DWITH_TBB=ON \
> -DWITH_V4L=ON \
> -DWITH_GTK=ON \
> -DWITH_OPENGL=ON \
> -DBUILD_EXAMPLES=ON ..
时,出现错误,大家可不可以看看怎么解决这个问题?



-- Detected version of GNU GCC: 54 (504)
-- FP16: Feature disabled
-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found suitable version "1.2.8", minimum required is "1.2.3")
-- Found ZLIB: /usr/lib/i386-linux-gnu/libz.so (found version "1.2.8")
-- Found OpenEXR: /usr/lib/i386-linux-gnu/libIlmImf.so
CMake Warning at cmake/OpenCVFindLibsGUI.cmake:18 (find_package):
By not providing "FindQt5Core.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Core", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5Core" with any
of the following names:

Qt5CoreConfig.cmake
qt5core-config.cmake

Add the installation prefix of "Qt5Core" to CMAKE_PREFIX_PATH or set
"Qt5Core_DIR" to a directory containing one of the above files. If
"Qt5Core" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:556 (include)


CMake Warning at cmake/OpenCVFindLibsGUI.cmake:19 (find_package):
By not providing "FindQt5Gui.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Gui", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5Gui" with any
of the following names:

Qt5GuiConfig.cmake
qt5gui-config.cmake

Add the installation prefix of "Qt5Gui" to CMAKE_PREFIX_PATH or set
"Qt5Gui_DIR" to a directory containing one of the above files. If "Qt5Gui"
provides a separate development package or SDK, be sure it has been
installed.
Call Stack (most recent call first):
CMakeLists.txt:556 (include)


CMake Warning at cmake/OpenCVFindLibsGUI.cmake:20 (find_package):
By not providing "FindQt5Widgets.cmake" in CMAKE_MODULE_PATH this project
has asked CMake to find a package configuration file provided by
"Qt5Widgets", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Widgets" with
any of the following names:

Qt5WidgetsConfig.cmake
qt5widgets-config.cmake

Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH or set
"Qt5Widgets_DIR" to a directory containing one of the above files. If
"Qt5Widgets" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:556 (include)


CMake Warning at cmake/OpenCVFindLibsGUI.cmake:21 (find_package):
By not providing "FindQt5Test.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Qt5Test", but
CMake did not find one.

Could not find a package configuration file provided by "Qt5Test" with any
of the following names:

Qt5TestConfig.cmake
qt5test-config.cmake

Add the installation prefix of "Qt5Test" to CMAKE_PREFIX_PATH or set
"Qt5Test_DIR" to a directory containing one of the above files. If
"Qt5Test" provides a separate development package or SDK, be sure it has
been installed.
Call Stack (most recent call first):
CMakeLists.txt:556 (include)


CMake Warning at cmake/OpenCVFindLibsGUI.cmake:22 (find_package):
By not providing "FindQt5Concurrent.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"Qt5Concurrent", but CMake did not find one.

Could not find a package configuration file provided by "Qt5Concurrent"
with any of the following names:

Qt5ConcurrentConfig.cmake
qt5concurrent-config.cmake

Add the installation prefix of "Qt5Concurrent" to CMAKE_PREFIX_PATH or set
"Qt5Concurrent_DIR" to a directory containing one of the above files. If
"Qt5Concurrent" provides a separate development package or SDK, be sure it
has been installed.
Call Stack (most recent call first):
CMakeLists.txt:556 (include)


qmake: could not exec '/usr/lib/i386-linux-gnu/qt4/bin/qmake': No such file or directory
CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
cmake/OpenCVFindLibsGUI.cmake:34 (find_package)
CMakeLists.txt:556 (include)


-- Configuring incomplete, errors occurred!
See also "/home/linguoting/opencv-3.2.0/build/CMakeFiles/CMakeOutput.log".
See also "/home/linguoting/opencv-3.2.0/build/CMakeFiles/CMakeError.log".
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 16.04安装opencv出错

#2

帖子 poloshiao » 2017-03-05 11:25

按照网上的教程
請提供網址
lintingting
帖子: 25
注册时间: 2016-11-18 13:21
系统: Ubuntu

Re: ubuntu 16.04安装opencv出错

#3

帖子 lintingting » 2017-03-06 22:21

poloshiao 写了:
按照网上的教程
請提供網址
http://www.cnblogs.com/arkenstone/p/6490017.html 就是这个上面的
头像
astolia
论坛版主
帖子: 6386
注册时间: 2008-09-18 13:11

Re: ubuntu 16.04安装opencv出错

#4

帖子 astolia » 2017-03-06 22:58

sudo apt install qtbase5-dev
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu 16.04安装opencv出错

#5

帖子 poloshiao » 2017-03-06 23:33

cmake -DCMAKE_BUILD_TYPE=RELEASE \
> -DCMAKE_INSTALL_PREFIX=/home/fanzong/anaconda2/envs/tensorflow \
> -DINSTALL_PYTHON_EXAMPLES=ON \
> -DINSTALL_C_EXAMPLES=OFF \
> -DOPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.2.0/modules \
> -DPYTHON_EXCUTABLE=/home/fanzong/anaconda2/envs/tensorflow/bin/python \
> -DWITH_TBB=ON \
> -DWITH_V4L=ON \
> -DWITH_GTK=ON \
> -DWITH_OPENGL=ON \
> -DBUILD_EXAMPLES=ON ..
注意 空格

http://www.pyimagesearch.com/2016/10/24 ... ll-opencv/

cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib-3.1.0/modules \
-D PYTHON_EXECUTABLE=~/.virtualenvs/cv/bin/python \
-D BUILD_EXAMPLES=ON ..
Scissors-DL
帖子: 1
注册时间: 2017-12-14 15:24
系统: ubuntu16.04

Re: ubuntu 16.04安装opencv出错

#6

帖子 Scissors-DL » 2017-12-14 15:37

请问你是怎么解决这个问题的呀 我现在也碰到了这个问题 耗费了五六个小时然而并没有什么结果 :Cry
回复