Score:2

How can I add gtk+3.0 from launchpad to 20.04?

cn flag

Sorry, fairly n00b with Ubuntu. I've searched and tried a few results but not sure how I could add the repo into my Ubuntu 20.04 in order to install gtk+3.0.

I've read:

This is the package I'm trying to install through apt https://launchpad.net/ubuntu/+source/gtk+3.0/3.24.18-1ubuntu1

What is the correct way to enable it via source.list and such that I could do sudo apt install gtk+3.0? Or is the correct way just to manually install it by downloading the .deb file??

I have not try to use synaptic yet, I'd like to stay as vanilla as possible, should I be using synaptic?

Thanks

Edit: The reason why I want to have the package is that I have source code that looks for gtk/gtk.h which depends on that gtk+-3.0 package.

fatal error: gtk/gtk.h: No such file or directory
   33 | #include <gtk/gtk.h>
      |          ^~~~~~~~~~~
hr flag
Why are you trying to install this package specifically?
codenamezero avatar
cn flag
I am trying to compile some of my code and is looking for `gtk/gtk.h` which is from `gtk+3.0`. I was able to accomplish this in 22.04 which had the package directly off `apt` but not with 20.22.
hr flag
`gtk+3.0` would be the *source package* for binary package `libgtk-3-0` and development package `libgtk-3-dev`. The -dev package is what you need for the header files. I'm seeing version `3.24.18-1ubuntu1` from focal main and version `3.24.20-0ubuntu1.1` from focal-updates main (20.04.5) - not sure what you mean by 20.22?
Score:4
us flag

Ubuntu hosts packages in Launchpad, but you don't need to download them from Launchpad. The same packages are available from the official repositories via APT.


To find out the package you need, go to https://packages.ubuntu.com, and search for the library name (here, gtk.h) in the contents of the packages. You can choose the version of Ubuntu (20.04 is focal).

enter image description here

The results are the following.

enter image description here

As you can see, the related packages are libgtk-2.0-dev, libgtk-3-dev, 4-cran-rgtk2. Since you need gtk-3, install the related package with

sudo apt install libgtk-3-dev
codenamezero avatar
cn flag
Thanks for your answer, which helped me troubleshoot and figure out what was my problem. I've actually already installed those other packages: `libgtk-3-dev libgcr-3-dev libdbus-glib-1-dev` but it won't find it. It turns out the, when my `Makefile` never had the proper `pkg-config` call execute correctly. After some tinkering, I found where the `gtk+-3.0.pc` located and prefixed the `PKG_CONFIG_PATH` before calling `x86_64-w64-mingw32-pkg-config`. It then finally generated the correct `--cflags` and was able to find the `gtk.h`.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.