10

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.

14

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

sudo apt-get install libglib2.0-dev

3
  • 2
    apt doesn't exist on gentoo by default... – ThreeFx Mar 8 '18 at 15:53
  • Got same error as OP when trying to install a python module via pip on raspberry. Installing libglib2.0-dev did the trick – Coconop Mar 26 '20 at 14:32
  • Worked perfectly on Ubuntu 18.04. – Gabriel Staples May 3 '20 at 20:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.