完整报错:

OpenCV(3.4.1) Error: 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 cvNamedWindow, file /media/data/914bd495-8af8-44c7-bc83-b389e496cbb3/backup/data/software/opencv-3.4.1/modules/highgui/src/window.cpp, line 618
terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(3.4.1) /media/data/914bd495-8af8-44c7-bc83-b389e496cbb3/backup/data/software/opencv-3.4.1/modules/highgui/src/window.cpp:618: error: (-2) 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 cvNamedWindow

解决方案:

  1. 安装libgtk2.0-dev,pkg-config
sudo apt-get install libgtk2.0-dev pkg-config
  1. 重新编译opencv

可参考:【opencv】ubuntu安装opencv4.2.0(支持cuda加速)

GitHub 加速计划 / opencv31 / opencv
77.39 K
55.71 K
下载
OpenCV: 开源计算机视觉库
最近提交(Master分支:3 个月前 )
7be5181b Fixed KLEIDICV_SOURCE_PATH handling for external KleidiCV 3 天前
c3ca3f4f - 3 天前
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐