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?
FWIW on OSX with El Capitan and homebrew, I did a:
1) I wasn't sure if the El Capitan upgrade had broken something, so first I made sure I had the latest gettext:
$ brew reinstall gettext
Then I had to re-link by doing:
$ brew unlink gettext && brew link gettext --force
After that, other tools were able to find it, and life went back to normal.
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. Underautoconf
theconfigure
script will do this automatically if it can't findlibintl
on the system.
I learned libintl comes from libgettext. If you already installed gettext by Homebrew, you would see:
$ locate libintl
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.8.dylib
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.a
/usr/local/Cellar/gettext/0.18.3.2/lib/libintl.dylib
<..snip..>
and the following works for me on the issue of "library not found for -lintl"
ln -s /usr/local/Cellar/gettext/0.18.3.2/lib/libintl.* /usr/local/lib/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With