3

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.

  • Could you explain why you want GTK+ 3.22? – Stephen Kitt Dec 2 '16 at 14:04
  • I am trying to create a music player in python and I want to use certain features of the GTK library which are only available from version 3.16 onwards. – Robert Bartlensky Dec 2 '16 at 14:06
  • try using this guide developer.gnome.org/gtk3/stable/gtk-building.html – Dababi Dec 2 '16 at 14:26
  • @Dababi would installing all dependencies and gtk in the opt folder allow me to have more than one version of gtk? If so, won't there be conflicts? – Robert Bartlensky Dec 2 '16 at 14:39
  • Yes as i know it will work. but you will need to install the dev packages for glib, atk, pango, cairo and other dependencies of gtk+ – Dababi Dec 2 '16 at 14:43
3

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
  • What does the J tag do? I've always seen xvfz – frank Apr 23 '18 at 0:20
  • @frank tar -j is used to extract bzip2 archive (bz2 extension); tar -z is used to extract gzip archive (gz extension) and tar -J is used to extract xz archive (xz extension). – Dababi Apr 23 '18 at 9:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.