8

I am having issues with installing GTK+ 3.22 on my laptop.

At first I tried downloading GTK and all its dependencies from here.

I ran ./configure && make && sudo make install to install the libraries above, but that did not work. I had a lot of undefined references and icons were missing so I uninstalled all the libraries.

After that I tried installing GTK again and made sure that I have every dependency installed correctly (even sub-dependencies). This time however I ran ./configure --prefix=/usr && make && sudo make install to install the libraries because I was following this guide.

The above broke my system completely, I couldn't do anything so I had to resort to safe-mode and reinstall the old GTK available on the apt repositories.

My question is, how can I install GTK+ 3.22 and make sure it works properly?

I am using Debian 8.

Robert Bartlensky
  • 135
  • 1
  • 2
  • 5

2 Answers2

4

To install GTK on debian you can follow these steps:

  • You download the source package here, it's distributed as a tar.bz2 or tar.xz file.
  • You unpack the source files using these commands:

    tar xvfj gtk+-3.2.0.tar.bz2 or tar xvfJ gtk+-3.2.0.tar.xz

  • Change directory to the directory created, then Install the package in /opt/gtk using:

    ./configure --prefix=/opt/gtk

  • Run make command to build the package and install it make &&make install

  • Set the LD_LIBRARY_PATH environment variable so the systems dynamic linker can find the newly installed libraries, and the PATH environment program so that utility binaries installed by the various libraries will be found.

  LD_LIBRARY_PATH="/opt/gtk/lib"
  PATH="/opt/gtk/bin:$PATH"
  export LD_LIBRARY_PATH PATH
Dababi
  • 3,229
  • 23
  • 23
3

If you want to compile gtk3 apps, you should install the libgtk-3-dev package:

sudo apt install libgtk-3-dev

Compiling from source isn't necessary in most use cases.

Narrateur du chaos
  • 247
  • 1
  • 2
  • 8