97

States here that the package gtk+-3.0 was not found:

karl@karl-ux303ln:~$ pkg-config --cflags gtk+-3.0
Package gtk+-3.0 was not found in the pkg-config search path.
Perhaps you should add the directory containing `gtk+-3.0.pc'
to the PKG_CONFIG_PATH environment variable
No package 'gtk+-3.0' found

However I apparantly have gtk3 installed:

karl@karl-ux303ln:~$ dpkg -l libgtk* | grep -e '^i' | grep -e 'libgtk-*[0-9]'
ii  libgtk-3-0:amd64                            3.14.15-0ubuntu1~14.04~ricotz1                              amd64        GTK+ graphical user interface library
ii  libgtk-3-bin                                3.14.15-0ubuntu1~14.04~ricotz1                              amd64        programs for the GTK+ graphical user interface library
ii  libgtk-3-common                             3.14.15-0ubuntu1~14.04~ricotz1                              all          common files for the GTK+ graphical user interface library
ii  libgtk2.0-0:amd64                           2.24.23-0ubuntu1.3                                          amd64        GTK+ graphical user interface library
ii  libgtk2.0-bin                               2.24.23-0ubuntu1.3                                          amd64        programs for the GTK+ graphical user interface library
ii  libgtk2.0-common                            2.24.23-0ubuntu1.3                                          all          common files for the GTK+ graphical user interface library

However I can't seem to find the file gtk+-3.0.pc:

karl@karl-ux303ln:~$ sudo find / -name "gtk+-3.0.pc"
karl@karl-ux303ln:~$ 

Any ideas? I'm trying to use cmake however it can't find gtk3.

1 Answer 1

163

I only had the normal gtk3 files installed, not the developement files needed for cmake to make use of:

sudo apt-get install build-essential libgtk-3-dev
3
  • Note: this command currently installs version 3.18.9 for Xenial
    – Hee Jin
    May 2, 2018 at 19:30
  • build-essential is already the newest version (12.4ubuntu1). libgtk-3-dev is already the newest version (3.22.30-1ubuntu1). 0 aktualizowanych, 0 nowo instalowanych, 0 usuwanych i 3 nieaktualizowanych. a@zelman:~$ pkg-config --modversion gtk Package gtk was not found in the pkg-config search path. Perhaps you should add the directory containing `gtk.pc' to the PKG_CONFIG_PATH environment variable No package 'gtk' found
    – Adam
    Jun 2, 2018 at 19:47
  • Similar error in compile geany-plugins solve with install: libwebkit2gtk-4.0-dev libgtk-3-dev libglib2.0-dev autogen autoconf libtool m4 automake pkg-config libtool intltool-debian
    – EsmaeelE
    Apr 8, 2020 at 18:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .