Error return
terminate called after throwing an instance of 'cv::Exception'
what(): OpenCV(3.4.3) /home/chen/Downloads/opencv-3.4.3/modules/highgui/src/window.cpp
:632: error: (-2:Unspecified error) The function is not implemented. Rebuild the library
with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install
libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function
'cvShowImage'
Aborted (core dumped)
Error resolution
Execute the command according to the solution given by the system
sudo apt-get install libgtk2.0-dev
sudo apt-get install pkg-config
It doesn’t solve the problem
Cause of problem
The problem is that there is a problem with the compilation configuration when installing opencv
I execute cmake…
and the correct command is
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
Solution:
Locate the folder where opencv is installed
cd /home/chen/Downloads/opencv-3.4.3
mkdir release
cd release
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..
sudo make
sudo make install
Problem-solving…
Read More:
- CMake Error: The source directory “opencv Install Catalog“ does not appear to contain CMakeLists.txt.
- [Solved] ORB_SLAM3 Compile Error: opencv4.0 not found four
- [Solved] Cmake compile opencv open-source project Error: but it set OpenCV_FOUND to FALSE so package “OpenCV” is considered to be…
- [Solved] Opencv3. X fatal error: opencv2/nonfree/nonfree.hpp: there is no such file or directory
- [Solved] Compile the program error: undefined reference to `cv::dnn::dnn4_v20210301::Net::~Net()‘
- [Solved] cmake: symbol lookup error: cmake: undefined symbol: _ZN4Json5ValueC1ERKSs
- [Solved] Opencv Compile Error: (CMake Error: The following variables are used in this project, but they are set to not)
- [Solved] Failed to find glog – Could not find glog include directory, set…
- [Solved] Opencv Calls PB Model Error: cv2.error: OpenCV(4.2.0)…
- How to Solve Ceres library Error when compiling A-LOAM
- Cv2.dnn read model error [How to Solve]
- [Solved] OpenCV Error: AttributeError: module ‘cv2‘ has no attribute ‘data‘
- [Solved] igb Compile Error: igb_main.c:10044:7: error: implicit declaration of function ‘isdigit’
- [Solved] import cv2 Error: ImportError: libGL.so.1: cannot open shared object file: No such file or directory
- [PX4 Bug] make px4_sitl gazebo Error: CMake Error: The following variables are used in this project
- Cmake Error The C compiler identification is GNU 7.5.0 — The CXX compiler identification is unknown
- How to Solve Opencv Error: CPP: 1557 error
- [Solved] OpenCV Train the class Error: Bad argument & Error: Insufficient memory
- [Solved] OpenCV VideoWriter Error: FFMPEG: tag ‘MP4V‘ is not supported with codec id 12 and format mp4
- Grpc Compilation issues: “C++ versions less than C++11 are not supported.