What is libintl.h and where can I get it?

Adam Templeton picture Adam Templeton · Jul 7, 2012 · Viewed 56.7k times · Source

Trying to do a make install of git from source, and it keep kicking up the error:

 make install
* new build flags or prefix
CC credential-store.o
In file included from credential-store.c:1:
In file included from ./cache.h:8:
./gettext.h:17:11: fatal error: 'libintl.h' file not found
#       include <libintl.h>
            ^
1 error generated.
make: *** [credential-store.o] Error 1

No amount of Googling has turned up anything on lib.intl.h. What is this elusive library, and how can I get it so I can finally install git?

Answer

Keith Thompson picture Keith Thompson · Jul 7, 2012

Depending on the system, it's probably part of the GNU C library (glibc).

Note that just installing the file libintl.h isn't likely to do you any good.

On Debian-based systems (including Debian, Ubuntu, and Linux Mint), it's part of the libc6-dev package, installed with:

sudo apt-get install libc6-dev

Since you're using Mac OS X, a Google search for "libintl.h OSX" shows a lot of people having similar problems. According to the INSTALL file in the Git sources:

Set NO_GETTEXT to disable localization support and make Git only use English. Under autoconf the configure script will do this automatically if it can't find libintl on the system.