How To Install gtk2 on Rocky Linux 8

In this tutorial we learn how to install gtk2 on Rocky Linux 8. gtk2 is GTK+ graphical user interface library

Introduction

In this tutorial we learn how to install gtk2 on Rocky Linux 8.

What is gtk2

GTK+ is a multi-platform toolkit for creating graphical user interfaces. Offering a complete set of widgets, GTK+ is suitable for projects ranging from small one-off tools to complete application suites.

We can use yum or dnf to install gtk2 on Rocky Linux 8. In this tutorial we discuss both methods but you only need to choose one of method to install gtk2.

Install gtk2 on Rocky Linux 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

After updating yum database, We can install gtk2 using dnf by running the following command:

sudo dnf -y install gtk2

Install gtk2 on Rocky Linux 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

After updating yum database, We can install gtk2 using yum by running the following command:

sudo yum -y install gtk2

How To Uninstall gtk2 on Rocky Linux 8

To uninstall only the gtk2 package we can use the following command:

sudo dnf remove gtk2

gtk2 Package Contents on Rocky Linux 8

/usr/bin/gtk-query-immodules-2.0-32
/usr/bin/update-gtk-immodules
/usr/lib/.build-id
/usr/lib/.build-id/0e
/usr/lib/.build-id/0e/bca00fba18ac68cec7e04fa6a904f19dbc2068
/usr/lib/.build-id/18
/usr/lib/.build-id/18/fb62150f8d6972be9809047dee71b01622ab0b
/usr/lib/.build-id/1c
/usr/lib/.build-id/1c/d5b91943bb5701b4321f5630851d654ffd62de
/usr/lib/.build-id/28
/usr/lib/.build-id/28/b152538e0ef733be11d6e2e3150c494fefdb41
/usr/lib/.build-id/4a
/usr/lib/.build-id/4a/960e1b41b1e641247745a4b4c35e7407e836d2
/usr/lib/.build-id/97
/usr/lib/.build-id/97/2c1ceb2f759e48ac8b27906267c226f33fe183
/usr/lib/.build-id/97/f485d1741dbf0b310321c7e9140c48641a2d0c
/usr/lib/.build-id/c0
/usr/lib/.build-id/c0/44f88257d33444dba616707ee09d66c302800f
/usr/lib/.build-id/d3
/usr/lib/.build-id/d3/90a24fd78162d46404ea83dc25294ade10ae80
/usr/lib/.build-id/ec
/usr/lib/.build-id/ec/592a7c508d4632a588ec8cef3df091d074fe41
/usr/lib/girepository-1.0
/usr/lib/girepository-1.0/Gdk-2.0.typelib
/usr/lib/girepository-1.0/GdkX11-2.0.typelib
/usr/lib/girepository-1.0/Gtk-2.0.typelib
/usr/lib/gtk-2.0
/usr/lib/gtk-2.0/2.10.0
/usr/lib/gtk-2.0/2.10.0/engines
/usr/lib/gtk-2.0/2.10.0/engines/libpixmap.so
/usr/lib/gtk-2.0/2.10.0/filesystems
/usr/lib/gtk-2.0/2.10.0/immodules
/usr/lib/gtk-2.0/2.10.0/immodules.cache
/usr/lib/gtk-2.0/2.10.0/printbackends
/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-file.so
/usr/lib/gtk-2.0/2.10.0/printbackends/libprintbackend-lpr.so
/usr/lib/gtk-2.0/immodules
/usr/lib/gtk-2.0/modules
/usr/lib/gtk-2.0/modules/libferret.so
/usr/lib/gtk-2.0/modules/libgail.so
/usr/lib/libgailutil.so.18
/usr/lib/libgailutil.so.18.0.1
/usr/lib/libgdk-x11-2.0.so.0
/usr/lib/libgdk-x11-2.0.so.0.2400.32
/usr/lib/libgtk-x11-2.0.so.0
/usr/lib/libgtk-x11-2.0.so.0.2400.32
/usr/share/doc/gtk2
/usr/share/doc/gtk2/AUTHORS
/usr/share/doc/gtk2/NEWS
/usr/share/doc/gtk2/README
/usr/share/gtk-2.0
/usr/share/licenses/gtk2
/usr/share/licenses/gtk2/COPYING
/usr/share/locale/af/LC_MESSAGES/gtk20.mo
/usr/share/locale/am/LC_MESSAGES/gtk20.mo
/usr/share/locale/ang/LC_MESSAGES/gtk20.mo
/usr/share/locale/ar/LC_MESSAGES/gtk20.mo
/usr/share/locale/as/LC_MESSAGES/gtk20.mo
/usr/share/locale/ast/LC_MESSAGES/gtk20.mo
/usr/share/locale/az/LC_MESSAGES/gtk20.mo
/usr/share/locale/az_IR/LC_MESSAGES/gtk20.mo
/usr/share/locale/be/LC_MESSAGES/gtk20.mo
/usr/share/locale/be@latin/LC_MESSAGES/gtk20.mo
/usr/share/locale/bg/LC_MESSAGES/gtk20.mo
/usr/share/locale/bn/LC_MESSAGES/gtk20.mo
/usr/share/locale/bn_IN/LC_MESSAGES/gtk20.mo
/usr/share/locale/br/LC_MESSAGES/gtk20.mo
/usr/share/locale/bs/LC_MESSAGES/gtk20.mo
/usr/share/locale/ca/LC_MESSAGES/gtk20.mo
/usr/share/locale/ca@valencia/LC_MESSAGES/gtk20.mo
/usr/share/locale/crh/LC_MESSAGES/gtk20.mo
/usr/share/locale/cs/LC_MESSAGES/gtk20.mo
/usr/share/locale/cy/LC_MESSAGES/gtk20.mo
/usr/share/locale/da/LC_MESSAGES/gtk20.mo
/usr/share/locale/de/LC_MESSAGES/gtk20.mo
/usr/share/locale/dz/LC_MESSAGES/gtk20.mo
/usr/share/locale/el/LC_MESSAGES/gtk20.mo
/usr/share/locale/en_CA/LC_MESSAGES/gtk20.mo
/usr/share/locale/en_GB/LC_MESSAGES/gtk20.mo
/usr/share/locale/eo/LC_MESSAGES/gtk20.mo
/usr/share/locale/es/LC_MESSAGES/gtk20.mo
/usr/share/locale/et/LC_MESSAGES/gtk20.mo
/usr/share/locale/eu/LC_MESSAGES/gtk20.mo
/usr/share/locale/fa/LC_MESSAGES/gtk20.mo
/usr/share/locale/fi/LC_MESSAGES/gtk20.mo
/usr/share/locale/fr/LC_MESSAGES/gtk20.mo
/usr/share/locale/ga/LC_MESSAGES/gtk20.mo
/usr/share/locale/gl/LC_MESSAGES/gtk20.mo
/usr/share/locale/gu/LC_MESSAGES/gtk20.mo
/usr/share/locale/he/LC_MESSAGES/gtk20.mo
/usr/share/locale/hi/LC_MESSAGES/gtk20.mo
/usr/share/locale/hr/LC_MESSAGES/gtk20.mo
/usr/share/locale/hu/LC_MESSAGES/gtk20.mo
/usr/share/locale/hy/LC_MESSAGES/gtk20.mo
/usr/share/locale/ia/LC_MESSAGES/gtk20.mo
/usr/share/locale/id/LC_MESSAGES/gtk20.mo
/usr/share/locale/io/LC_MESSAGES/gtk20.mo
/usr/share/locale/is/LC_MESSAGES/gtk20.mo
/usr/share/locale/it/LC_MESSAGES/gtk20.mo
/usr/share/locale/ja/LC_MESSAGES/gtk20.mo
/usr/share/locale/ka/LC_MESSAGES/gtk20.mo
/usr/share/locale/kk/LC_MESSAGES/gtk20.mo
/usr/share/locale/kn/LC_MESSAGES/gtk20.mo
/usr/share/locale/ko/LC_MESSAGES/gtk20.mo
/usr/share/locale/ku/LC_MESSAGES/gtk20.mo
/usr/share/locale/li/LC_MESSAGES/gtk20.mo
/usr/share/locale/lt/LC_MESSAGES/gtk20.mo
/usr/share/locale/lv/LC_MESSAGES/gtk20.mo
/usr/share/locale/mai/LC_MESSAGES/gtk20.mo
/usr/share/locale/mi/LC_MESSAGES/gtk20.mo
/usr/share/locale/mk/LC_MESSAGES/gtk20.mo
/usr/share/locale/ml/LC_MESSAGES/gtk20.mo
/usr/share/locale/mn/LC_MESSAGES/gtk20.mo
/usr/share/locale/mr/LC_MESSAGES/gtk20.mo
/usr/share/locale/ms/LC_MESSAGES/gtk20.mo
/usr/share/locale/my/LC_MESSAGES/gtk20.mo
/usr/share/locale/nb/LC_MESSAGES/gtk20.mo
/usr/share/locale/nds/LC_MESSAGES/gtk20.mo
/usr/share/locale/ne/LC_MESSAGES/gtk20.mo
/usr/share/locale/nl/LC_MESSAGES/gtk20.mo
/usr/share/locale/nn/LC_MESSAGES/gtk20.mo
/usr/share/locale/nso/LC_MESSAGES/gtk20.mo
/usr/share/locale/oc/LC_MESSAGES/gtk20.mo
/usr/share/locale/or/LC_MESSAGES/gtk20.mo
/usr/share/locale/pa/LC_MESSAGES/gtk20.mo
/usr/share/locale/pl/LC_MESSAGES/gtk20.mo
/usr/share/locale/ps/LC_MESSAGES/gtk20.mo
/usr/share/locale/pt/LC_MESSAGES/gtk20.mo
/usr/share/locale/pt_BR/LC_MESSAGES/gtk20.mo
/usr/share/locale/ro/LC_MESSAGES/gtk20.mo
/usr/share/locale/ru/LC_MESSAGES/gtk20.mo
/usr/share/locale/rw/LC_MESSAGES/gtk20.mo
/usr/share/locale/si/LC_MESSAGES/gtk20.mo
/usr/share/locale/sk/LC_MESSAGES/gtk20.mo
/usr/share/locale/sl/LC_MESSAGES/gtk20.mo
/usr/share/locale/sq/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr@ije/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr@latin/LC_MESSAGES/gtk20.mo
/usr/share/locale/sv/LC_MESSAGES/gtk20.mo
/usr/share/locale/ta/LC_MESSAGES/gtk20.mo
/usr/share/locale/te/LC_MESSAGES/gtk20.mo
/usr/share/locale/th/LC_MESSAGES/gtk20.mo
/usr/share/locale/tk/LC_MESSAGES/gtk20.mo
/usr/share/locale/tr/LC_MESSAGES/gtk20.mo
/usr/share/locale/tt/LC_MESSAGES/gtk20.mo
/usr/share/locale/ug/LC_MESSAGES/gtk20.mo
/usr/share/locale/uk/LC_MESSAGES/gtk20.mo
/usr/share/locale/ur/LC_MESSAGES/gtk20.mo
/usr/share/locale/uz/LC_MESSAGES/gtk20.mo
/usr/share/locale/uz@cyrillic/LC_MESSAGES/gtk20.mo
/usr/share/locale/vi/LC_MESSAGES/gtk20.mo
/usr/share/locale/wa/LC_MESSAGES/gtk20.mo
/usr/share/locale/xh/LC_MESSAGES/gtk20.mo
/usr/share/locale/yi/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_HK/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gtk20.mo
/usr/share/man/man1/gtk-query-immodules-2.0-32.1.gz
/usr/share/man/man1/gtk-query-immodules-2.0.1.gz
/usr/share/man/man1/update-gtk-immodules.1.gz
/usr/share/themes/Default
/usr/share/themes/Default/gtk-2.0-key
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Emacs
/usr/share/themes/Emacs/gtk-2.0-key
/usr/share/themes/Emacs/gtk-2.0-key/gtkrc
/usr/share/themes/Raleigh
/usr/share/themes/Raleigh/gtk-2.0
/usr/share/themes/Raleigh/gtk-2.0/gtkrc
/usr/bin/gtk-query-immodules-2.0-64
/usr/bin/update-gtk-immodules
/usr/lib/.build-id
/usr/lib/.build-id/00
/usr/lib/.build-id/00/f08c37011280a6b3304b9ffe96842df8a3400e
/usr/lib/.build-id/02
/usr/lib/.build-id/02/0d6a30352fe74fb13c8152d1d5c41898bafd9b
/usr/lib/.build-id/03
/usr/lib/.build-id/03/fa7eceeaf85697c6935fec99d63a33169429df
/usr/lib/.build-id/11
/usr/lib/.build-id/11/1410b00477909458a13f90a54298584fa17aa3
/usr/lib/.build-id/24
/usr/lib/.build-id/24/267f5599abd13a5c698b6815253f326bd270f6
/usr/lib/.build-id/42
/usr/lib/.build-id/42/5e26651a5392c8f2d5bbc515a44a59098c1811
/usr/lib/.build-id/45
/usr/lib/.build-id/45/80abcd3ca37ca2c7fba34cf3350b7b110a4786
/usr/lib/.build-id/84
/usr/lib/.build-id/84/5f27da39e144efab4dbf41e6ef9607b5e56d2f
/usr/lib/.build-id/a0
/usr/lib/.build-id/a0/a21f8f8eeca76c5c07272f4a23ddc54202883e
/usr/lib/.build-id/c5
/usr/lib/.build-id/c5/8291496016aa22adbf34b1d0d16a34cbb28e60
/usr/lib64/girepository-1.0
/usr/lib64/girepository-1.0/Gdk-2.0.typelib
/usr/lib64/girepository-1.0/GdkX11-2.0.typelib
/usr/lib64/girepository-1.0/Gtk-2.0.typelib
/usr/lib64/gtk-2.0
/usr/lib64/gtk-2.0/2.10.0
/usr/lib64/gtk-2.0/2.10.0/engines
/usr/lib64/gtk-2.0/2.10.0/engines/libpixmap.so
/usr/lib64/gtk-2.0/2.10.0/filesystems
/usr/lib64/gtk-2.0/2.10.0/immodules
/usr/lib64/gtk-2.0/2.10.0/immodules.cache
/usr/lib64/gtk-2.0/2.10.0/printbackends
/usr/lib64/gtk-2.0/2.10.0/printbackends/libprintbackend-cups.so
/usr/lib64/gtk-2.0/2.10.0/printbackends/libprintbackend-file.so
/usr/lib64/gtk-2.0/2.10.0/printbackends/libprintbackend-lpr.so
/usr/lib64/gtk-2.0/immodules
/usr/lib64/gtk-2.0/modules
/usr/lib64/gtk-2.0/modules/libferret.so
/usr/lib64/gtk-2.0/modules/libgail.so
/usr/lib64/libgailutil.so.18
/usr/lib64/libgailutil.so.18.0.1
/usr/lib64/libgdk-x11-2.0.so.0
/usr/lib64/libgdk-x11-2.0.so.0.2400.32
/usr/lib64/libgtk-x11-2.0.so.0
/usr/lib64/libgtk-x11-2.0.so.0.2400.32
/usr/share/doc/gtk2
/usr/share/doc/gtk2/AUTHORS
/usr/share/doc/gtk2/NEWS
/usr/share/doc/gtk2/README
/usr/share/gtk-2.0
/usr/share/licenses/gtk2
/usr/share/licenses/gtk2/COPYING
/usr/share/locale/af/LC_MESSAGES/gtk20.mo
/usr/share/locale/am/LC_MESSAGES/gtk20.mo
/usr/share/locale/ang/LC_MESSAGES/gtk20.mo
/usr/share/locale/ar/LC_MESSAGES/gtk20.mo
/usr/share/locale/as/LC_MESSAGES/gtk20.mo
/usr/share/locale/ast/LC_MESSAGES/gtk20.mo
/usr/share/locale/az/LC_MESSAGES/gtk20.mo
/usr/share/locale/az_IR/LC_MESSAGES/gtk20.mo
/usr/share/locale/be/LC_MESSAGES/gtk20.mo
/usr/share/locale/be@latin/LC_MESSAGES/gtk20.mo
/usr/share/locale/bg/LC_MESSAGES/gtk20.mo
/usr/share/locale/bn/LC_MESSAGES/gtk20.mo
/usr/share/locale/bn_IN/LC_MESSAGES/gtk20.mo
/usr/share/locale/br/LC_MESSAGES/gtk20.mo
/usr/share/locale/bs/LC_MESSAGES/gtk20.mo
/usr/share/locale/ca/LC_MESSAGES/gtk20.mo
/usr/share/locale/ca@valencia/LC_MESSAGES/gtk20.mo
/usr/share/locale/crh/LC_MESSAGES/gtk20.mo
/usr/share/locale/cs/LC_MESSAGES/gtk20.mo
/usr/share/locale/cy/LC_MESSAGES/gtk20.mo
/usr/share/locale/da/LC_MESSAGES/gtk20.mo
/usr/share/locale/de/LC_MESSAGES/gtk20.mo
/usr/share/locale/dz/LC_MESSAGES/gtk20.mo
/usr/share/locale/el/LC_MESSAGES/gtk20.mo
/usr/share/locale/en_CA/LC_MESSAGES/gtk20.mo
/usr/share/locale/en_GB/LC_MESSAGES/gtk20.mo
/usr/share/locale/eo/LC_MESSAGES/gtk20.mo
/usr/share/locale/es/LC_MESSAGES/gtk20.mo
/usr/share/locale/et/LC_MESSAGES/gtk20.mo
/usr/share/locale/eu/LC_MESSAGES/gtk20.mo
/usr/share/locale/fa/LC_MESSAGES/gtk20.mo
/usr/share/locale/fi/LC_MESSAGES/gtk20.mo
/usr/share/locale/fr/LC_MESSAGES/gtk20.mo
/usr/share/locale/ga/LC_MESSAGES/gtk20.mo
/usr/share/locale/gl/LC_MESSAGES/gtk20.mo
/usr/share/locale/gu/LC_MESSAGES/gtk20.mo
/usr/share/locale/he/LC_MESSAGES/gtk20.mo
/usr/share/locale/hi/LC_MESSAGES/gtk20.mo
/usr/share/locale/hr/LC_MESSAGES/gtk20.mo
/usr/share/locale/hu/LC_MESSAGES/gtk20.mo
/usr/share/locale/hy/LC_MESSAGES/gtk20.mo
/usr/share/locale/ia/LC_MESSAGES/gtk20.mo
/usr/share/locale/id/LC_MESSAGES/gtk20.mo
/usr/share/locale/io/LC_MESSAGES/gtk20.mo
/usr/share/locale/is/LC_MESSAGES/gtk20.mo
/usr/share/locale/it/LC_MESSAGES/gtk20.mo
/usr/share/locale/ja/LC_MESSAGES/gtk20.mo
/usr/share/locale/ka/LC_MESSAGES/gtk20.mo
/usr/share/locale/kk/LC_MESSAGES/gtk20.mo
/usr/share/locale/kn/LC_MESSAGES/gtk20.mo
/usr/share/locale/ko/LC_MESSAGES/gtk20.mo
/usr/share/locale/ku/LC_MESSAGES/gtk20.mo
/usr/share/locale/li/LC_MESSAGES/gtk20.mo
/usr/share/locale/lt/LC_MESSAGES/gtk20.mo
/usr/share/locale/lv/LC_MESSAGES/gtk20.mo
/usr/share/locale/mai/LC_MESSAGES/gtk20.mo
/usr/share/locale/mi/LC_MESSAGES/gtk20.mo
/usr/share/locale/mk/LC_MESSAGES/gtk20.mo
/usr/share/locale/ml/LC_MESSAGES/gtk20.mo
/usr/share/locale/mn/LC_MESSAGES/gtk20.mo
/usr/share/locale/mr/LC_MESSAGES/gtk20.mo
/usr/share/locale/ms/LC_MESSAGES/gtk20.mo
/usr/share/locale/my/LC_MESSAGES/gtk20.mo
/usr/share/locale/nb/LC_MESSAGES/gtk20.mo
/usr/share/locale/nds/LC_MESSAGES/gtk20.mo
/usr/share/locale/ne/LC_MESSAGES/gtk20.mo
/usr/share/locale/nl/LC_MESSAGES/gtk20.mo
/usr/share/locale/nn/LC_MESSAGES/gtk20.mo
/usr/share/locale/nso/LC_MESSAGES/gtk20.mo
/usr/share/locale/oc/LC_MESSAGES/gtk20.mo
/usr/share/locale/or/LC_MESSAGES/gtk20.mo
/usr/share/locale/pa/LC_MESSAGES/gtk20.mo
/usr/share/locale/pl/LC_MESSAGES/gtk20.mo
/usr/share/locale/ps/LC_MESSAGES/gtk20.mo
/usr/share/locale/pt/LC_MESSAGES/gtk20.mo
/usr/share/locale/pt_BR/LC_MESSAGES/gtk20.mo
/usr/share/locale/ro/LC_MESSAGES/gtk20.mo
/usr/share/locale/ru/LC_MESSAGES/gtk20.mo
/usr/share/locale/rw/LC_MESSAGES/gtk20.mo
/usr/share/locale/si/LC_MESSAGES/gtk20.mo
/usr/share/locale/sk/LC_MESSAGES/gtk20.mo
/usr/share/locale/sl/LC_MESSAGES/gtk20.mo
/usr/share/locale/sq/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr@ije/LC_MESSAGES/gtk20.mo
/usr/share/locale/sr@latin/LC_MESSAGES/gtk20.mo
/usr/share/locale/sv/LC_MESSAGES/gtk20.mo
/usr/share/locale/ta/LC_MESSAGES/gtk20.mo
/usr/share/locale/te/LC_MESSAGES/gtk20.mo
/usr/share/locale/th/LC_MESSAGES/gtk20.mo
/usr/share/locale/tk/LC_MESSAGES/gtk20.mo
/usr/share/locale/tr/LC_MESSAGES/gtk20.mo
/usr/share/locale/tt/LC_MESSAGES/gtk20.mo
/usr/share/locale/ug/LC_MESSAGES/gtk20.mo
/usr/share/locale/uk/LC_MESSAGES/gtk20.mo
/usr/share/locale/ur/LC_MESSAGES/gtk20.mo
/usr/share/locale/uz/LC_MESSAGES/gtk20.mo
/usr/share/locale/uz@cyrillic/LC_MESSAGES/gtk20.mo
/usr/share/locale/vi/LC_MESSAGES/gtk20.mo
/usr/share/locale/wa/LC_MESSAGES/gtk20.mo
/usr/share/locale/xh/LC_MESSAGES/gtk20.mo
/usr/share/locale/yi/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_CN/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_HK/LC_MESSAGES/gtk20.mo
/usr/share/locale/zh_TW/LC_MESSAGES/gtk20.mo
/usr/share/man/man1/gtk-query-immodules-2.0-64.1.gz
/usr/share/man/man1/gtk-query-immodules-2.0.1.gz
/usr/share/man/man1/update-gtk-immodules.1.gz
/usr/share/themes/Default
/usr/share/themes/Default/gtk-2.0-key
/usr/share/themes/Default/gtk-2.0-key/gtkrc
/usr/share/themes/Emacs
/usr/share/themes/Emacs/gtk-2.0-key
/usr/share/themes/Emacs/gtk-2.0-key/gtkrc
/usr/share/themes/Raleigh
/usr/share/themes/Raleigh/gtk-2.0
/usr/share/themes/Raleigh/gtk-2.0/gtkrc

References

Summary

In this tutorial we learn how to install gtk2 on Rocky Linux 8 using yum and dnf.