OPENCV error:unspecified error occurred in ubuntu-opencv:ubuntu14.04 Opencv3.3.0 use

Source: Internet
Author: User
Tags gtk

Problem Description:

ubuntu@ubuntu:~/opencv-3.3.0/cpp_luckynote/opencv_lena$./displayimage. /lfw/anna_chicherova/anna_chicherova_0001.jpg 
OpenCV error:unspecified Error (the function is not implemented. Rebuild the library with Windows, GTK + 2.x or Carbon support. If you are are on Ubuntu or Debian, install Libgtk2.0-dev and pkg-config, then re-run or cmake script) in configure Dow, File/opt/conda/conda-bld/opencv_1491943414359/work/opencv-3.1.0/modules/highgui/src/window.cpp, line 527
terminate called after throwing a instance of ' cv::exception ' What
  ():  /opt/conda/conda-bld/opencv_ 1491943414359/work/opencv-3.1.0/modules/highgui/src/window.cpp:527:error: ( -2) The function is not implemented. Rebuild the library with Windows, GTK + 2.x or Carbon support. If you are are on Ubuntu or Debian, install Libgtk2.0-dev and pkg-config, then re-run or CMake script in function cv Namedwindow

has been discarded (core has been dumped)


Obviously already install Libgtk2.0-dev and pkg-config Why also reported the above error, the above error reminding and the net Netizen gives the explanation, may think, before installs OpenCV must install the Libgtk2.0-dev and Pkg-config, after installing them both or forgetting to install will report the above error.
But the author has opencv complete uninstall and CMake compiled after the installation, will still report the above problems, reinstall, restart the system, installation of different versions have tried, or an error, how to break. The author on this above toss all day, finally solved.

The solution is as follows:
A. First complete uninstall OPENCV, and delete all the files related to Opencv, complete delete Opencv method See "Ubuntu-opencv" Ubuntu14.04 Opencv3.3.0 complete Uninstall scheme;
B. Then remember to uninstall the Libgtk2.0-dev first, uninstall the program as follows:
sudo apt-get autoremove gtk+-2.0
sudo apt-get install Gnome-core-devel
sudo apt-get install Libgtk2.0-dev or sudo apt-get install libgtk2.0* (I am using the previous installation)
Pkg-config–modversion gtk+-2.0 installed You can use this command to view the gtk+-2.0 installation version.
C. Finally CMake installation OPENCV, installation method Reference "UBUNTU-OPENCV" Ubuntu14.04 Opencv3.3.0 installation configuration and test

According to the above ABC, I have solved the above problem perfectly

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.