How can I install GTK+ 3.0 and use that instead of GTK+ 2.24?
Asked
Active
Viewed 5e+01k times
3 Answers
278
To use gtk2 or gtk3 apps you don't need to install anything. But, if you want to develop (or even just compile) apps this is what you're looking for:
sudo apt-get install libgtk-3-dev

Eliah Kagan
- 117,780

Thomio
- 3,399
-
Is this true for Windows and MacOS as well (or just for Ubuntu or GNU/Linux?) – sunyata Oct 31 '16 at 01:03
-
10Just for Ubuntu. – Thomio Oct 31 '16 at 13:33
-
11this should be the preferred answer – Asalle May 22 '19 at 07:21
28
GTK3 is installed by default, please don't download and compile from the GTK website.
If you want to use GTK3 yourself, compile against that instead GTK2, or use PyGObject instead of PyGTK if you're using Python.
If you want all programs to use GTK3 instead of GTK2, it won't work, it's a job for the application developers to port their application.

Timo
- 4,680
-
1The package name changed a bit, try this: dpkg -l libgtk-[0-9]* | grep ^i – Timo Feb 04 '12 at 11:49
-
Also note that GTK2 and GTK3 are parellel installable. So it's not that you are using one or the other, it's the applications that choose which version. – Timo Feb 04 '12 at 11:51
-
@Nick if you have questions about specific apps, it would be better to ask a new question. We wouldn't want useful information to get lost in the comments. :) – Michael Martin-Smucker Feb 05 '12 at 00:24
-
Wasn't installed by default on my Ubuntu 20.04 LTS. Used below answer. – Philip Rego Aug 20 '20 at 16:24
3
If you already have an older version of GTK and you want to upgrade it then you can do the following:
sudo add-apt-repository ppa:gnome3-team/gnome3-staging
sudo add-apt-repository ppa:gnome3-team/gnome3
sudo apt update
sudo apt dist-upgrade