I want install on my Debian 6 git. Apt-get install git give me old version. So, step by step to install latest stable git version on Debian:
apt-get install libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev wget https://www.kernel.org/pub/software/scm/git/git-1.8.4.1.tar.gz tar -zxf git-1.8.4.1.tar.gz cd git-1.8.4.1 make prefix=/usr/local all make prefix=/usr/local install
Ups…. result make:
LINK git-credential-store libgit.a(utf8.o): In function `reencode_string_iconv': /root/git-1.8.4.1/utf8.c:530: undefined reference to `libiconv' libgit.a(utf8.o): In function `reencode_string_len': /root/git-1.8.4.1/utf8.c:569: undefined reference to `libiconv_open' /root/git-1.8.4.1/utf8.c:588: undefined reference to `libiconv_close' /root/git-1.8.4.1/utf8.c:582: undefined reference to `libiconv_open' collect2: ld returned 1 exit status make: *** [git-credential-store] Error 1
So download and compile necessary library libiconv:
wget http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz tar -zxvf libiconv-1.14.tar.gz cd libiconv-1.14 ./configure --prefix=/usr/local/libiconv make make install
and repeat make, make install from beginning…That’s all!
Have a nice day ๐