How to install GLib 2.0 on Ubuntu 17.04

How to install GLib 2.0 on Ubuntu 17.04

The GLib is a cross-platform bundle of low-level system libraries written in C and developed by GNOME. It provides advanced data structures, such as memory chunks, doubly and singly linked lists, thread programming, mutuxes, etc. This tutorial covers the installation of GLib 2.0 on Ubuntu 17.04.

Installation procedure

To start with the installation procedure, add the repo by executing the following command.

root@linuxhelp1:~# add-apt-repository ppa:eugenesan/ppa
This repository contains collection of customized, updated, ported and backported
packages for two last LTS releases and latest pre-LTS release.
Packages for older releases relocated to ppa:eugenesan/archive or deleted.
+-------------------------------------------------------------------------------------+
| Disclaimer:
+-------------------------------------------------------------------------------------+
* Packages in this and related PPAs are for personal use only.
  They developed specifically for several custom environments and may not work for you.
* Usage of packages in this PPA, in some forms, might contradict licenses of software
  packaged in this and related PPAs. End users and administrator are responsible for
  runtime licensing and possible legal consequences.
* Some packages provided with their dependencies while some might require additional
  Ubuntu repositories and external PPAs. Below is the list of
.
.
.
gpg: keybox ' /tmp/tmpep5uscs5/pubring.gpg'  created
gpg: /tmp/tmpep5uscs5/trustdb.gpg: trustdb created
gpg: key E61380B28313A596: public key " Launchpad synergy+"  imported
gpg: Total number processed: 1
gpg:imported: 1
OK

The repositories are added successfully to the target system. Then, update the repo by executing the apt-get update command.

root@linuxhelp1:~# apt-get update
Get:1 http://security.ubuntu.com/ubuntu zesty-security InRelease [89.2 kB]
Get:2 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty InRelease [15.4 kB]
Hit:3 http://in.archive.ubuntu.com/ubuntu zesty InRelease
Get:4 http://in.archive.ubuntu.com/ubuntu zesty-updates InRelease [89.2 kB]
Get:5 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main i386 Packages [1,108 B]
Get:6 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main amd64 Packages [1,100 B]
Get:7 http://ppa.launchpad.net/eugenesan/ppa/ubuntu zesty/main Translation-en [1,288 B]
Hit:8 http://in.archive.ubuntu.com/ubuntu zesty-backports InRelease
Fetched 197 kB in 3s (61.9 kB/s)
Reading package lists... Done

The target system is updated with the required repositories. Install the GLib package and press y to continue with the installation.

root@linuxhelp1:~# apt-get install glib2.0 -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting ' libglib2.0-cil-dev'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-tests'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-0-dbg'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-dev-bin'  for regex ' glib2.0' 
Note, selecting ' libdbus-glib2.0-cil-dev'  for regex ' glib2.0' 
Note, selecting ' libtaglib2.0-cil'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-bin'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-cil'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-dev'  for regex ' glib2.0' 
Note, selecting ' libdbus-glib2.0-cil'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-doc'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-data'  for regex ' glib2.0' 
Note, selecting ' libglib2.0-0'  for regex ' glib2.0' 
libglib2.0-0 is already the newest version (2.52.0-1).
libglib2.0-0 set to manually installed.
libglib2.0-bin is already the newest version (2.52.0-1).
libglib2.0-bin set to manually installed.
libglib2.0-data is already the newest version (2.52.0-1).
libglib2.0-data set to manually installed.
The following additional packages will be installed:
binfmt-support ca-certificates-mono cli-common libdbus2.0-cil libdbus2.0-cil-dev libmono-corlib4.5-cil
libmono-i18n-west4.0-cil libmono-i18n4.0-cil libmono-posix4.0-cil libmono-security4.0-cil
libmono-system-configuration4.0-cil libmono-system-core4.0-cil libmono-system-security4.0-cil libmono-system-xml4.0-cil
libmono-system4.0-cil libpcre3-dev libpcre32-3 libpcrecpp0v5 mono-4.0-gac mono-gac mono-runtime mono-runtime-common
mono-runtime-sgen zlib1g-dev
.
.
.
Certificate added: C=CN, O=WoSign CA Limited, CN=Certification Authority of WoSign
Certificate added: C=CN, O=WoSign CA Limited, CN=CA
Certificate added: C=US, OU=www.xrampsecurity.com, O=XRamp Security Services Inc, CN=XRamp Global Certification Authority
Certificate added: C=RO, O=certSIGN, OU=certSIGN ROOT CA
Certificate added: C=TW, O=" Chunghwa Telecom Co., Ltd." , OU=ePKI Root Certification Authority
Certificate added: C=US, O=" thawte, Inc." , OU=Certification Services Division, OU=" (c) 2006 thawte, Inc. - For authorized use only" , CN=thawte Primary Root CA
Certificate added: C=US, O=" thawte, Inc." , OU=" (c) 2007 thawte, Inc. - For authorized use only" , CN=thawte Primary Root CA - G2
Certificate added: C=US, O=" thawte, Inc." , OU=Certification Services Division, OU=" (c) 2008 thawte, Inc. - For authorized use only" , CN=thawte Primary Root CA - G3
173 new root certificates were added to your trust store.
Import process completed.
Done
done.

The package has been successfully added in the target system. To know more about the options that can be used with GLib package, run the following command.

root@linuxhelp1:~# glib-mkenums --help
Usage:
glib-mkenums [OPTION...] [FILES...]
Help Options:
-h, --helpShow this help message

Utility Options:
--identifier-prefix < text> Identifier prefix
--symbol-prefix < text> Symbol prefix
--fhead < text> Output file header
--fprod < text> Per input file production
--ftail < text> Output file trailer
--eprod < text> Per enum text (produced prior to value iterations)
--vhead < text> Value header, produced before iterating over enum values
--vprod < text> Value text, produced for each enum value
--vtail < text> Value tail, produced after iterating over enum values
--comments < text> Comment structure
--template fileTemplate file
--output fileOutput file
-v, --versionPrint version informations

Production text substitutions:
@EnumName@PrefixTheXEnum
@enum_name@prefix_the_xenum
@ENUMNAME@PREFIX_THE_XENUM
@ENUMSHORT@THE_XENUM
@ENUMPREFIX@PREFIX
@VALUENAME@PREFIX_THE_XVALUE
@valuenick@the-xvalue
@valuenum@the integer value (limited support, Since: 2.26)
@type@either enum or flags
@Type@either Enum or Flags
@TYPE@either ENUM or FLAGS
@filename@name of current input file
@basename@base name of the current input file (Since: 2.22)

Wasn' t that an easy installation procedure? The GLib also includes standard macros, dynamic loading of modules, and also timers.

Tag : Ubuntu GLib
Comment
sbergman
Feb 17 2022
This was extremely helpful. Thank you.
Add a comment
FAQ
Q
how to add repo for installing GLib in ubuntu?
A
add the repo by executing the following command
# add-apt-repository ppa:eugenesan/ppa
Q
what is the command to install Glib in ubuntu?
A
Install the GLib package by following command
# apt-get install glib2.0 -y
Q
what is the source code used for Glib?
A
GLib is a cross-platform bundle of low-level system libraries written in C and developed by GNOME
Q
What are its essntial features for Glib?
A
essntial features for Glib are
It provides advanced data structures, such as memory chunks, doubly and singly linked lists, thread programming, mutuxes, etc
Q
What are its major options in GLib?
A
You can find major utility options of GLib by "glib-mkenums --help"