Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Debian Jessie - can't find libgtk-3-dev

639 views
Skip to first unread message

Charlie Gibbs

unread,
Sep 19, 2015, 4:09:16 AM9/19/15
to
I'm trying my hand at writing some GTK code. I started with some sample
C code that uses GTK+-2.0 and got it to compile. But I thought I'd
try moving to the APIs offered by GTK+-3.0. I can't get the new version
to compile. I seem to have the GTK+-3.0 package, because other programs
run just fine. The development tools seem to be missing, though, and
I can't find that package (which a lot of googling consistently tells
me is libgtk-3-dev). I'm running an early version of Debian Jessie:

$ uname -a
Linux killer-penguin 3.14-2-amd64 #1 SMP Debian 3.14.13-2 (2014-07-24) x86_64 GNU/Linux
$ cat makefile
CFLAGS := $(shell pkg-config --cflags --libs gtk+-3.0)
LDFLAGS := $(shell pkg-config --libs glib-2.0 gtk+-3.0)

gtkwindows: gtkwindows.c
cc $(CFLAGS) $< -o $@ $(LDFLAGS)
$ make
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you shoud add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you shoud add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found
cc gtkwindows.c -o gtkwindows
gtkwindows.c:1:21: fatal error: gtk/gtk.h: No such file or directory
#include <gtk/gtk.h>
^
compilation terminated.
makefile:5: recipe for target 'gtkwindows' failed
make: *** [gtkwindows] Error 1
$ echo $PKG_CONFIG_PATH

$ ls -l /usr/include | grep gtk
drwxr-xr-x 4 root root 4096 Jan 1 2015 gtk-2.0
drwxr-xr-x 4 root root 4096 Jan 1 2015 gtk-unix-print-2.0
$ sudo find / -print | grep gtk | grep pc
/usr/lib/pkgconfig/gtk-sharp-2.0.pc
/usr/lib/pkgconfig/gtk-dotnet-2.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-x11-2.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-2.0.pc
/usr/lib/x86_64-linux-gnu/pkgconfig/gtk+-unix-print-2.0.pc
$ sudo apt-get install gtk+-3.0
Reading package lists...
Building dependency tree...
Reading state information...
libjavascriptcoregtk-3.0-0 is already the newest version.
libwebkitgtk-3.0-common is already the newest version.
libwebkitgtk-3.0-0 is already the newest version.
libgtk-3-0 is already the newest version.
gir1.2-gtk-3.0 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 86 not upgraded.
$ sudo apt-get install libgtk-3-dev
Reading package lists...
Building dependency tree...
Reading state information...
Package libgtk-3-dev is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'libgtk-3-dev' has no installation candidate

In addition to lines for my installation DVDs, I've added the following
lines to /etc/apt/sources.list:

deb http://ftp.us.debian.org/debian jessie non-free
deb-src http://ftp.us.debian.org/debian jessie non-free

Where do I go from here? Is libgtk-3-dev actually the package I need?
If so, where is it?

Thanks in advance for any help...

--
/~\ cgi...@kltpzyxm.invalid (Charlie Gibbs)
\ / I'm really at ac.dekanfrus if you read it the right way.
X Top-posted messages will probably be ignored. See RFC1855.
/ \ HTML will DEFINITELY be ignored. Join the ASCII ribbon campaign!

Pascal Hambourg

unread,
Sep 19, 2015, 4:33:04 AM9/19/15
to
Charlie Gibbs a écrit :
> I'm running an early version of Debian Jessie:
>
> $ uname -a
> Linux killer-penguin 3.14-2-amd64 #1 SMP Debian 3.14.13-2 (2014-07-24) x86_64 GNU/Linux

Indeed this is an old kernel from the time when Jessie was still in
development. You should consider upgrading the the current stable Jessie.

> E: Package 'libgtk-3-dev' has no installation candidate
>
> In addition to lines for my installation DVDs, I've added the following
> lines to /etc/apt/sources.list:
>
> deb http://ftp.us.debian.org/debian jessie non-free

Why only the 'non-free' section ? The package you want to install in is
the 'main' section.

> deb-src http://ftp.us.debian.org/debian jessie non-free

You only need deb-src if you want to build Debian packages.

> Where do I go from here?

Add 'main' to the 'deb' line in /etc/apt/sources.list.
apt-get update
apt-cache policy libgtk-3-dev
apt-get install libgtk-3-dev

> Is libgtk-3-dev actually the package I need?

I cannot answer this question.

Charlie Gibbs

unread,
Sep 19, 2015, 5:13:09 PM9/19/15
to
On 2015-09-19, Pascal Hambourg <boite-...@plouf.fr.eu.org> wrote:

> Charlie Gibbs a écrit :
>
>> I'm running an early version of Debian Jessie:
>>
>> $ uname -a
>> Linux killer-penguin 3.14-2-amd64 #1 SMP Debian 3.14.13-2 (2014-07-24) x86_64 GNU/Linux
>
> Indeed this is an old kernel from the time when Jessie was still in
> development. You should consider upgrading the the current stable Jessie.

Good point. At the time Jessie was still in testing, and Wheezy didn't
have new enough drivers to play Portal.

> Add 'main' to the 'deb' line in /etc/apt/sources.list.
> apt-get update
> apt-cache policy libgtk-3-dev
> apt-get install libgtk-3-dev

Thank you, thank you, thank you! That fixed everything.
0 new messages