AltDan
AltDan

Reputation: 844

zlib error installing GIT on shared hosting

I am attempting to install git onto my UK2 shared hosting server, following this guide:

http://www.randallkent.com/development/install-git-on-a-cpanel-shared-hosting-account

I have got to the very last couple of steps 'make' & 'make install' when i receive the following error:

config.status: executing config.mak.autogen commands
* new build flags
CC credential-store.o
In file included from credential-store.c:1:
cache.h:19:18: warning: zlib.h: No such file or directory
In file included from credential-store.c:1:
cache.h:21: error: expected specifier-qualifier-list before ‘z_stream’
make: *** [credential-store.o] Error 1

My hosting provider has enabled zlib compression for me but i am still unable to install git.

Is there something I am missing or is it not possible on my hosting server?

Thanks very much

Upvotes: 5

Views: 11430

Answers (3)

neotam
neotam

Reputation: 2731

It seems to be you have to install zlib. If you are using Centos, install zlib by using yum install zlib-devel If you are using Debian, install zlib by using apt-get install zlib1g-dev. If you wanna get source grep it from http://www.zlib.net/ and install it, if you do this sure you will have git in your system. Note: If you install git from the aptitude package manager or from repositories it will automatically install the dependencies.

Upvotes: 18

arezae
arezae

Reputation: 51

You only need to use ./configure --with-zlib={your zlib path}

It helped me to compile git with this option.

Upvotes: 4

Rees McIvor
Rees McIvor

Reputation: 121

I have had the same issue with a client who is hosted on their server. But thankfully cpanel comes with a version of GIT. Its at "/usr/local/cpanel/3rdparty/bin/git"

You can see a fix here: http://www.codefuel.co.uk/cpanel-git-resolved/

Upvotes: 0

Related Questions