Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 505
henfj Avatar asked Jun 05 '14 09:06

henfj


2 Answers

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.

like image 106
eng27 Avatar answered Nov 08 '22 14:11

eng27


You are missing the libexpat1-dev library (Xml parsing c library)

If you can install it first (maybe with slapt-get), then you can go on with the compilation of git.

like image 41
VonC Avatar answered Nov 08 '22 13:11

VonC