Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ubuntu OpenCV Install and Setup (Qt5 ?)

New Linux user. OS: Ubuntu 14.04 Install: OpenCV 2.4.9

I'm attempting to install OpenCV for use on codeblocks (or other IDE). I've followed (or attempted to follow, actually) each and every instruction on the following pages:

I first used https://help.ubuntu.com/community/OpenCV including the provided script.

Then http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html

Finally http://www.samontab.com/web/2012/06/installing-opencv-2-4-1-ubuntu-12-04-lts/

I even saw Add the installation prefix of "Qt5Widgets" to CMAKE_PREFIX_PATH but I'm not even sure what the answer means, let alone if it will work since it apparently didn't for the Question OP.

This is where the errors appear to start in terminal output while running the script:

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".

After prior attempts, I've got a folder OpenCV inside Home, with a zip file and folder both named opencv-2.4.9

So "some" things have been done, but not a complete install ready for use. Maybe a simpler explanation of what

"""""""""""""(quoted answer from earlier question) This is documented: http://doc-snapshot.qt-project.org/qt5-stable/cmake-manual.html The easiest way to use CMake is to set the CMAKE_PREFIX_PATH environment variable to the install prefix of Qt 5 Do this export CMAKE_PREFIX_PATH=/home/user/Programs/ where references the compiler etc, so that this complete path is valid: /home/user/Programs//bin/qmake """""""""""""""*

means exactly would solve this.

Thanks. (FYI, I can't/don't know how to use this because I don't have programs folder, or even user folder , and the suggested terminal command kicks out an error)

like image 890
TK421 Avatar asked Jun 24 '14 04:06

TK421


People also ask

Where is OpenCV installed Ubuntu?

By default OpenCV will be installed to the /usr/local directory, all files will be copied to following locations: /usr/local/bin - executable files. /usr/local/lib - libraries (. so)

How do I download qt5 in Linux?

Download the Qt installer from its official download site at https://www.qt.io/download-qt-installer. The site should detect that your computer is running linux and recommend "Qt Online Installer for linux". Click the green "Download" button to download the installer.


1 Answers

I was able to solve this by using sudo apt-get install qt5-default

like image 140
Niaja Avatar answered Dec 01 '22 00:12

Niaja