Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I follow the instructions at: I get an error when running ./ --prefix=/usr stating that:

conftest.c:28:18: fatal error: glib.h: No such file or directory
compilation terminated. 
share|improve this question

You most likely didn't installed the development libraries as indicated. Run this and try again:

sudo apt-get install subversion gtk-doc-tools autoconf automake libtool libgtk2.0-dev libpango1.0-dev libicu-dev libxslt-dev libsoup2.4-dev libsqlite3-dev gperf bison flex libjpeg62-dev libpng12-dev libxt-dev autotools-dev libgstreamer-plugins-base0.10-dev libenchant-dev libgail-dev
share|improve this answer
I had done this also, but still no luck. – BrianW Dec 5 '13 at 3:01

open your terminal and type as

      apt-cache search glib

it will show you some packages and install glib package with

    sudo apt-get install packagename

ps: i am off to my ubuntu system to give exact command

share|improve this answer
After doing these things and running "apt-cache search glib" it comes back with lots of packages so I run the ones like libglib2.0-dev and libglib2.0-0, but I still get the same error. I'm new to Ubuntu so I would like to find the Makefile such that I can add the -I compiler flag to reference glib.h, but I can't find it. – BrianW Dec 5 '13 at 2:22
I also can't find conftest.c – BrianW Dec 5 '13 at 2:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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