Installing libgtk-4-0 on Raspberry (Debian) OS

Hi all,

I’m Looking to install GTK 4.0. :slight_smile:

I am hoping to just Install, the way I did with GTK 3.0, rather than to build.

For example:
The following results in the error below!

pi@raspberrypi:~ $ sudo apt install libgtk-4-0

E: Unable to locate package libgtk-4-0

Am I being an idiot?

Thanks in advance for any help to get me a little further along!

Roark

1 Like

Debian currently does not have GTK4 in their repositories, so you cannot install it via APT.

You will need to build GTK4 locally.

1 Like

I fear the setup may prove dubious (it looks like 6 or 7 dependencies alone are needed, and if any version of any item was not compatible with the rest, I could be spinning my wheels) so I suppose I will wait and hope the situation with Debian and GTK 4 changes.

Thank you for letting me know!

Regards,
Roark

Debian does actually have it but it’s in the experimental distribution: libgtk-4-1

You can get it by adding this line to your /etc/apt/sources.list:

deb http://deb.debian.org/debian experimental main

Then run these commands as root:

apt update
apt install -t experimental libgtk-4-1 libgtk-4-dev
1 Like

GTK 4.1 is a development snapshot, and should not be used for application development.

The package name is misleading, libgtk-4 is the real name of the package and the -1 is the version of the package in Debian. libgtk-4-1 will actually install the 4.0 series, and libgtk-4-0 is the 3.99 series.

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.