pkg-config找不到gtk + -3.0


42

此处表明未找到gtk + -3.0软件包:

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

但是我显然已经安装了gtk3:

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

但是我似乎找不到该文件gtk+-3.0.pc

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

有任何想法吗?我正在尝试使用cmake,但是找不到gtk3。

Answers:


77

我只安装了常规的gtk3文件,没有安装cmake所需的开发文件:

sudo apt-get install build-essential libgtk-3-dev

注意:此命令当前安装Xenial的版本3.18.9
Hee Jin

build-essential已经是最新版本(12.4ubuntu1)。libgtk-3-dev已经是最新版本(3.22.30-1ubuntu1)。0 aktualizowanych,0 nowo instalowanych,0 usuwanych和3 nieaktualizowanych。a @ zelman:〜$ pkg-config --modversion gtk在pkg-config搜索路径中找不到软件包gtk。也许您应该将包含gtk.pc的目录添加到PKG_CONFIG_PATH环境变量中没有找到软件包gtk
Adam
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.