views:

139

answers:

2

I installed gtk+2.0 version 2.18.3 but when i run command

dpkg -i libgtk2.0-dev_2.18.3-1_i386.deb

i have the next error

but when i checked the /usr/lib/libgtk2.0-0 i found the version of the libgtk is 2.12.9

why the new installtion not override the pre one? and what i should do now?

----------------------------------------ERROR------

Unpacking replacement libgtk2.0-dev ...

dpkg: dependency problems prevent configuration of libgtk2.0-dev:

libgtk2.0-dev depends on libgtk2.0-0 (= 2.18.3-1); however:

Version of libgtk2.0-0 on system is 2.12.9-3ubuntu5.

libgtk2.0-dev depends on libglib2.0-0 (>= 2.21.3); however:

Version of libglib2.0-0 on system is 2.16.6-0ubuntu1.2.

libgtk2.0-dev depends on libglib2.0-dev (>= 2.21.3); however:

Version of libglib2.0-dev on system is 2.16.6-0ubuntu1.2.

libgtk2.0-dev depends on libcairo2-dev (>= 1.6.4-6.1); however:

Version of libcairo2-dev on system is 1.6.0-0ubuntu2.

dpkg: error processing libgtk2.0-dev (--install):

dependency problems - leaving unconfigured

+2  A: 

You can't just install a new libgtk package willy-nilly; you need to upgrade the packages that it depends on, at the same time (in this case, libglib, libcairo, and their respective dev packages).

(This question is more appropriate for Super User, and I've voted to migrate the question there.)

Chris Jester-Young
So how can i do this ?can you give me the command?
+1  A: 

You probably want apt-get install libgtk2.0-dev=2.18.3-1, because most people really don't want to be in the business of manually managing package versions and dependencies.

But if that doesn't work, you'll need to manually look at the dependencies of libgtk2.0-dev (with apt-cache show libgtk2.0-dev) and download the matching versions of each package it depends on if they're not already installed (again, apt-cache show (dependency)).

rescdsk
apt-cache show libgtk2.0-dev it return a lot of comments what i can do with it
Look for the line that begins with `Depends:`. That line has a list of everything that the libgtk2.0-dev package depends on.It's difficult to maintain a system like this, you have to ask yourself if it's worth it to get whatever stuff is new in 2.18 that's not in 2.12...
rescdsk