0

I have tried to install opencv 3.1 in ubuntu 16.04, because I need to do an algorithm in c ++ with opencv, I have followed the steps of different tutorials but none has worked for me, the only one with which I have advanced more is this:

https://github.com/cesco345/StemApks/blob/master/TutorialsNotebook%20(1).ipynb

But when I get to the cmake step, I get these errors,

 -- Found OpenEXR: /usr/lib/x86_64-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:535 (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:535 (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:535 (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:535 (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:535 (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-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:535 (include)


 -- Configuring incomplete, errors occurred!
 See also "/home/jenny/opencv-3.1.0/build/CMakeFiles/CMakeOutput.log".
 See also "/home/jenny/opencv-3.1.0/build/CMakeFiles/CMakeError.log".

which I do not solve, someone who has some idea how to solve it to install it or someone who has a good tutorial that I can follow so I can install opencv in ubuntu please.

  • I suggest you to remove qt5 support... a simple solution is to use ccmake or the gui interface of cmake. So check the components you need. Let me know. I build OpenCV 3.1 for a lot of kind of CPU using Ubuntu 16.04 without any problem. – Elvis Dukaj Aug 30 '17 at 14:16
  • You know you can use OpenCV and C++ in Windows, Mac and in almost any other popular S.O., right? – Leonardo Alves Machado Aug 30 '17 at 14:25
  • Yes, I already know that exists for windows, but when compiling and running the code is faster in ubuntu, that's why I'm installing it, I just had some errors – Colours123 Aug 31 '17 at 12:56
0

In your terminal cd to your build folder. Run ccmake .., use arrow keys to navigate between the pages, on the last page, arrow down to WITH_QT, enter to turn it off. Press c to configure and g to generate.

In future use this link for best result.

  • says "command not found" – Colours123 Aug 31 '17 at 12:57
  • Finish the install but when i try to run a sample show this error "/usr/bin/ld: cannot find -lippicv collect2: error: ld returned 1 exit status " – Colours123 Sep 1 '17 at 4:43
  • @Colours123 CMake should have downloaded IPP when building OpenCV. Try running sudo ldconfig. If you want to disable IPP, from build directory run ccmake .., arrow down to WITH_IPP, enter to disable, press c then g. Run make again. – zindarod Sep 1 '17 at 9:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.