红联Linux门户
Linux帮助

OpenCV Error: Unspecified error (The function is not imp

发布时间:2016-06-10 09:57:06来源:linux网站作者:晴语欢

Ubuntu14.04安装好opencv3.0.0之后,进行测试:

$./DisplayImage lena.jpg

得到如下结果:

OpenCV 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 /home/aborn/software/OpenCV-3.0.0/modules/highgui/src/

window.cpp, line …


网上给的解释是: GTK+2.x要先于OpenCV安装(You should remove the current installation of opencv from your system; rebuild your opencv lib after installing gtk dev lib in the correct path; and reinstall the compiled opencv lib. )


解决方法:

1.卸载opencv

(1)移除式卸载:apt-get remove 软件名1 软件名2 …;(移除软件包)

(2)清除式卸载 :apt-get --purge remove 软件名1 软件名2...;(同时清除配置)

建议选择清除式卸载

(3)卸载不管用的话,直接到opencv解压目录把解压出的opencv包删掉


2.查看没安装的文件,没装的装上

之前安装时的命令:

sudo apt-get install build-essential cmake libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev

查看方法:

$ dpkg –listfiles cmake(查询系统中属于cmake的文件)

$ dpkg –listfiles libgtk2.0-dev(查询系统中属于libgtk2.0-dev的文件)

$ dpkg –listfiles 其他包名


3.重新安装opencv并进行测试


本文永久更新地址:http://www.linuxdiyf.com/linux/21389.html