How to acquire expat.h for the compilation of git?

henfj picture henfj · Jun 5, 2014 · Viewed 7.2k times · Source

I need install git (v 2.0) on slackware 14. I experience an error during

$ make install prefix=/usr/local

run in the source root:

LINK git-http-fetch
CC http-push.o
  http-push.c:17:19: fatal error: expat.h: No such file or directory
  #include <expat.h>
                  ^
  compilation terminated.
  make: *** [http-push.o] Error 1

What is missing for the compilation to proceed?

Answer

eng27 picture eng27 · Jun 5, 2014

I also faced same problem today.
My environment is Scientific Linux (2.6.32-431.17.1el6.x86_64).

Though I already have package:
expat.x86_64

the following package was also necessary to do "make":
expat-devel.x86_64

Therefore, I did

# yum install expat-devel

Though the environment is different, I hope this information will help you.