15

I have a strange problem when trying to install dev-lib/gobject-introspection:

>>> Emerging (1 of 9) dev-libs/gobject-introspection-1.42.0 
...... 
configure: error: Package requirements (glib-2.0 > 2.36.0) were not met: 

No package `glib-2.0` found

I have dev-libs/glib-2.42.1 installed, but there is some strange issue with pkg-config:

$ pkg-config --modversion glib-2.0 
Package glib-2.0 was not found in the pkg-config search path. 
Perhaps you should add the directory containing `glib-2.0.pc` 
to the PKG_CONFIG_PATH environment variable 
No package 'glib-2.0' found 

$ echo $PKG_CONFIG_PATH 

$

And looks like there is no glib-2.0.pc file in /usr/lib/pkgconfig . There is the file /usr/lib32/pkgconfig/glib-2.0.pc, but for previous version of glib-2.38.2

Can anybody explain to me, what can be wrong and how can fix this? I've already asked this question on the gentoo forum, but maybe I'll have better luck here.

1 Answer 1

24

An alternative answer, one that doesn't involve pulling in nearly as many unneeded packages, is:

sudo apt-get install libglib2.0-dev

4
  • 3
    apt doesn't exist on gentoo by default...
    – ThreeFx
    Mar 8, 2018 at 15:53
  • 1
    Got same error as OP when trying to install a python module via pip on raspberry. Installing libglib2.0-dev did the trick
    – n0p
    Mar 26, 2020 at 14:32
  • Worked perfectly on Ubuntu 18.04. May 3, 2020 at 20:52
  • For those who stumble on this question, it's glib2-devel using yum.
    – hfingler
    Sep 20, 2023 at 19:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .