I am using opencv 3 on ubunut 12.04 and while displaying an image the error message asks me to build the library with libgtk2.0-dev. I tried sudo apt-get install libgtk2.0-dev but I get the following error.
teraflops@teraflops-Inspiron-3542:~$ sudo apt-get install libgtk2.0-devReading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgtk2.0-dev : Depends: libpango1.0-dev (>= 1.20) but it is not going to be installed
Depends: libcairo2-dev (>= 1.6.4-6.1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
teraflops@teraflops-Inspiron-3542:~$
I have almost tried all the online solutions like here 1 and here 2 with no results. Please suggest me any means to solve the problem. I have tried installing the libpango1-dev and libcairo2-dev separately but both have broken dependencies leading to libfontconfig1-dev. Trying to install the later gives
teraflops@teraflops-Inspiron-3542:~$ sudo apt-get install libfontconfig1-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libfontconfig1-dev : Depends: libfontconfig1 (= 2.8.0-3ubuntu9.1) but 2.10.1-0ubuntu3 is to be installed
E: Unable to correct problems, you have held broken packages.
Any kind of suggestion/solution is most welcome
sudo apt-get install -f
show, after you try to install libgtk2.0-dev? – Pilot6 May 25 '15 at 13:44apt-cache policy libfontconfig1
– g_p May 29 '15 at 05:19sudo apt-get install libfontconfig1=2.8.0
It should be in the precise repository. Or you can download and install it withsudo dpkg -i /PATH/TO/FILE.deb
from here. – Byte Commander May 29 '15 at 20:09