Installing and configuring GTK2 on IBM AIX


GTK2 is one of the most complex packages available on IBM® AIX® Toolbox because it has a lot of dependencies. Installing GTK2 and its dependencies one by one takes a lot of time and is generally very confusing.

Because GTK2 for AIX is available from multiple AIX open source repositories, it is very important to install all the libraries and other dependencies (all of them) from a single repository. If you install the dependencies from different repositories, it eventually breaks the GTK2 library because libraries from different repositories are sometimes not compatible with one another.

As GTK2 itself is a dependency for a lot of other popular software (such as Eclipse and IBM Installation Manager), breaking GTK2 might lead to the malfunctioning or breaking of this software. If GTK2 is broken, it can be difficult to find the incompatible library and fix it if you are not well informed.

This tutorial explains how users can install GTK2, which is the currently available version, through YUM or a .tar file from AIX Toolbox.


This tutorial is best understood if users have some basic skills in:

Estimated time

It takes around 30 minutes for users to read and understand this tutorial.

Installing GTK2 through YUM

YUM is the easiest way to install any package because you don’t need to have any prior knowledge of packages and their dependencies.

There are two ways to set up YUM for AIX and install GTK2 (or any other package for that matter) through YUM.

  1. Using the AIX Toolbox repository
  2. Using a local repository

YUM with AIX Toolbox repository

This method requires an internet connection to the system or a proxy server on which you’re installing GTK2, because YUM will be pulling all the packages to be installed from the AIX Toolbox repository.

You need to perform the following steps:

  1. Download the YUM installation script, from AIX Toolbox.
  2. Run the ./ script.

Note: The script downloads packages from AIX Toolbox so an internet connection is required. It then installs and configures all the required packages.

YUM with a local repository

This method is handy if the system where YUM is configured doesn’t have an internet connection to the IBM public FTP server. This procedure requires a system that serves as a repository for the connected nodes on which installation is needed. The system that is serving as the repository should have an internet connection, so that it can be synced with the AIX repository. Details about installing and configuring the local repository are given in the YUM configuration tutorial.

After setting up YUM on AIX using one of the above methods, install GTK2 on AIX by running the following command:

yum install gtk2

This command installs GTK2 and any dependencies that are not already installed on the system. If any of the already installed dependencies are outdated or incompatible, YUM takes care of updating them.

Figure 1 shows a snapshot of YUM installation of GTK2 using AIX Toolbox as the repository. It shows how YUM is resolving the dependencies to be installed on the system along with GTK2 itself.

Figure 1. YUM resolving dependencies for GTK2 before installation

After resolving the dependencies, YUM installs all the required packages including GTK2 as shown in Figure 2.

Figure 2. Summary of dependencies shown by YUM before installation starts

Installing GTK2 using the .tar file

In addition to the above method, IBM provides a .tar file in the AIX Toolbox with an installation script to install GTK2 on AIX. This method is handy when your system does not have YUM configured, it is not connected to the internet, or when you do not want to use YUM. This method requires the RPM package to be installed on the system.

  1. Download the GTK2 .tar file from the AIX Toolbox repository.
  2. Copy it to the system where GTK2 installation is required.
  3. Extract the .tar file to a directory.
  4. Run the installation script, ./

This installation script works on all AIX platforms (6.1, 7.1, and 7.2). It installs all the required dependencies and removes/reinstalls all the incompatible packages that might cause GTK2 to fail.

Be aware, the ./ installation script is going to reinstall or update all the required packages and it will remove any external libX11 RPM installed on the system. The reason for this is, the GTK2 available in the AIX Toolbox is built with libX11, which comes with the AIX base file set (AIX libX11). So, any external libX11 RPM package installed on the system might eventually cause GTK2 to fail because of incompatibility.

After GTK2 is installed successfully, run the gtk-demo command to verify if it is running fine.

Figure 3. Notification shown by installer about the packages which will be installed/updated

Figure 4. Installation in progress

Known issues while running Eclipse/Eclipse-based applications

After successfully installing GTK2, you need to export LIBPATH to run Eclipse or any Eclipse-based application such as, IBM WebSphere® Application Server (WAS), IBM Installation Manager, and so on.

export LIBPATH=/opt/freeware/lib: /opt/freeware/lib64:$LIBPATH

The reason for setting LIBPATH as above is explained in the Eclipse forum.

After setting up LIBPATH, you can run Eclipse/Eclipse-based applications on AIX.


Installing GTK2 and its dependencies one by one takes a lot of time and is generally very confusing. Users, generally, end up in installing packages from different repositories or missing some dependencies. This leads to breaking their GTK2 and Eclipse-based applications, and sometimes RPM itself. The methods explained in this tutorial takes care of all the dependencies required to perform installation or updates on the system. You need not worry about the internal or chain dependencies of GTK2 or breaking of any other applications installed on the system. The two methods explained in this tutorial are easy to use and should eliminate any confusion.