54

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.

93

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
  • Note: this command currently installs version 3.18.9 for Xenial – Hee Jin May 2 '18 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 '18 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.