Search code examples
ubuntuglibgnome

Invalid version of dependency glib-2.0 when tring to meson build


I was trying to build GNOME todo app on Ubuntu 18.04.3 and when I use meson build I had the below error

Dependency glib-2.0 found: NO found 2.56.4 but need: '>= 2.58.0'

then I was upgrade the glib-2.0 through sudo apt-get install glib-2.0 the console out was

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'libspice-client-glib-2.0-dev' for regex 'glib-2.0'
Note, selecting 'libqt5glib-2.0-0' for regex 'glib-2.0'
Note, selecting 'gir1.2-spice-client-glib-2.0' for regex 'glib-2.0'
Note, selecting 'gir1.2-glib-2.0' for regex 'glib-2.0'
Note, selecting 'libspice-client-glib-2.0-1' for regex 'glib-2.0'
Note, selecting 'libspice-client-glib-2.0-8' for regex 'glib-2.0'
Note, selecting 'gir1.2-spiceclientglib-2.0' for regex 'glib-2.0'
gir1.2-glib-2.0 is already the newest version (1.56.1-1).
gir1.2-spiceclientglib-2.0 is already the newest version (0.34-1.1build1).
libqt5glib-2.0-0 is already the newest version (1.2.0-5).
libspice-client-glib-2.0-8 is already the newest version (0.34-1.1build1).
libspice-client-glib-2.0-dev is already the newest version (0.34-1.1build1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

which I assume glib is already the newest version( but it's not ). Does anyone know how to upgrade glib?


Solution

  • Ubuntu 18.04 will not have the newest version of GLib. They will stick with whatever is the newest version in the same stable release series as when 18.04 was released. From the looks of it, this would be GLib 2.56.x, not new enough for your purposes.

    You have a few options:

    • Build an older version of the app
    • Upgrade to a newer Ubuntu version
    • Download a GLib 2.58.x package from a newer Ubuntu version and any of its dependencies, and try to install it on your system (not recommended)
    • Use a tool such as JHBuild to download newer versions of libraries and build them in a separate build environment
    • Use a tool such as Flatpak to build the app in a pre-built environment with the right versions