itvision.altervista.org -> How to: compile and install GTK3 libraries in CentOS 6/6.x/6.10.

: I've updated the scripts and added support for gtkmm as well. You can now fully automatically compile gtk+-3.14.6 and gtkmm-3.14.0 for x86_64 and i686 in CentOS 6.10. To get the updated scripts you'll need to wire me anything above $175 (eight hours of work, including testing) in any currency/crypto. Thank you. The old (outdated) instructions are down below:


CentOS 6.6 doesn't contain GTK3 libraries, so you cannot install the software that is dependent on them. Here you will find the instructions how to compile and install GTK3 libraries (version 3.12.2 as of 2014-06-26) into /opt in CentOS 6.6.

1. Firstly you'll need to create a chroot environment with certain prerequisites.

# gtk3_mkchroot.sh

2. Secondly you'll need to run the script which will do everything automatically (in chroot). However there are several caveats. libbonobo-2.32.1 will not build, after ./configure you'll have to modify Makefile and remove activation-server from SUBDIRS. Secondly you'll have to build a new version of DBUS but its ./configure must be run without specifying --prefix. It must be built after building GLIB. So this script is not really automatic, I'm just too lazy to make it fully automatic ;-) Yet another caveat is that it's meant for i686. It can be trivially modified to run on x86_64 or any other architecture.

# gtk3_build.sh

3. You can now build and install software which requires GTK3 using these commands:

export LD_LIBRARY_PATH=/opt/gtk3/lib
export PATH="/opt/gtk3/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gtk3/lib/pkgconfig"
./configure && make && make install

or, alternatively,

export CFLAGS="-I/opt/gtk3/include -L/opt/gtk3/lib"
export PATH="/opt/gtk3/bin:$PATH"
export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/gtk3/lib/pkgconfig"
./configure && make && make install

You can download precompiled binaries from here (if you trust me, of course). They must be unpacked to /opt.

sha1sum gtk3-3.12.2.centos65.i686.tar.xz
5600d01511aa9594d26043459df7ef4094ba325b gtk3-3.12.2.centos65.i686.tar.xz

Mind that I removed most locale files to reduce the size of the file. I only left EN/ES/DE/IT/RU locales.

© 2012-2019 Artem S. Tashkinov. This material cannot be reproduced on any other website, you are only allowed to link to this webpage.

If you want to thank the author or if you want this how-to to be finally brought up to date, please, consider the ad at the top of the page. Thank you!

blog comments powered by Disqus free counters