I've developed a script which needs a specific version of (2.11.1).

Each developer in my team has his/her own virtual machine on the same remote physic server. My colleagues need that script, the problem is that some of them are using the shared which is outdated and there is no way to update it, and the others are using their own installation /usr/bin/git, which is not always up-to-date either.

In order for that script to work, the best solution I decided to work on is that before the script runs, it will install the wanted git LOCALLY (I mean under ~/custom/empty_dir), but this didn't work as I'm getting many errors when running make all doc info as described in git-scm

$make all doc info
    * new build flags
    CC credential-store.o
In file included from credential-store.c:1:0:
cache.h:40:18: fatal error: zlib.h: No such file or directory
 #include <zlib.h>
compilation terminated.
make: *** [credential-store.o] Error 1

Isn't it possible to install locally as explained above without of course impacting /usr/bin/git and /company/shared/softwares/git/bin/git ?

ps: PRETTY_NAME="SUSE Linux Enterprise Server 11 SP4"

  • Is zlib.h present in the include path? – dsstorefile1 Mar 2 '18 at 10:54
  • @dsstorefile no it is not, however zlib.c is – smarber Mar 2 '18 at 10:56
  • Well, you kinda need it if it's included in the source you're trying to compile. You'll have to bundle the build dependencies along with the git source and modify the include path so the build process can access them. – dsstorefile1 Mar 2 '18 at 10:58
  • 1
    Those "git-scm" build instructions tell you to install several dependencies, including the zlib-devel or libz-dev package. Did you do that? – JigglyNaga Mar 2 '18 at 11:05
  • @JigglyNaga the idea is to install git and its dependencies locally as I said...so no I didn't do that. I keep hoping that there is a way to do it :) – smarber Mar 2 '18 at 13:46

So, installing libz-dev should solve an issue:

apt-get install libz-dev

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.