opencv qt5安装linux,Ubuntu OpenCV安装和设置(Qt5吗?)

问题描述

新的Linux用户。操作系统:Ubuntu 14.04 Install:OpenCV 2.4.9

我正在尝试安装OpenCV以便在代码块(或其他IDE)上使用。我已经遵循(或实际上试图遵循)以下页面上的每条指令:

这是运行脚本时错误出现在终端输出中的位置:

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:466 (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:466 (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:466 (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:466 (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:466 (include)

qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory

CMake Error at /usr/share/cmake-2.8/Modules/FindQt4.cmake:1386 (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:466 (include)

-- Configuring incomplete, errors occurred!

See also "/home/*******/OpenCV/opencv-2.4.9/build/CMakeFiles/CMakeOutput.log".

See also "/home/*******/OpenCV/opencv-2.4.9/build/CMakeFiles/CMakeError.log".

经过先前的尝试,我在Home内有了一个OpenCV文件夹,其中有一个zip文件和名为opencv-2.4.9的文件夹。

这样就完成了”some”的事情,但是还没有完整的安装可供使用。也许是什么更简单的解释

“””””””””””””(引用先前问题的答案):http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html使用CMake的最简单方法是将CMAKE_PREFIX_PATH环境变量设置为Qt 5的安装前缀。执行此操作导出CMAKE_PREFIX_PATH = /home /user /Programs /,其中引用了编译器等。 ,以便此完整路径有效:/home /user /Programs //bin /qmake “”””””””””””””” *

就是完全可以解决这个问题。

谢谢。 (仅供参考,我可以’t/don’t知道如何使用它,因为我没有程序文件夹,甚至没有用户文件夹,建议的终端命令也将引发错误)

最佳回答

我可以使用sudo apt-get install qt5-default解决此问题

参考资料

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值