I need to determine which version of GTK+ is installed on Ubuntu
Man does not seem to help
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This suggestion will tell you which minor version of 2.0 is installed. Different major versions will have different package names because they can co-exist on the system (in order to support applications built with older versions).
Even for development files, which normally would only let you have one version on the system, you can have a version of gtk 1.x and a version of gtk 2.0 on the same system (the include files are in directories called gtk-1.2 or gtk-2.0).
So in short there isn’t a simple answer to ‘what version of GTK is on the system’. But…
Try something like:
to list all the libgtk packages, including -dev ones, that are on your system.
dpkg -lwill list all the packages that dpkg knows about, including ones that aren’t currently installed, so I’ve used grep to list only ones that are installed (line starts with i).Alternatively, and probably better if it’s the version of the headers etc that you’re interested in, use pkg-config:
will tell you what version of GTK 1.x development files are installed, and
will tell you what version of GTK 2.0. The old 1.x version also has its own gtk-config program that does the same thing. Similarly, for GTK+ 3: