http://www.blogjava.net/keenman/archive/2011/04/05/git-source-install-on-ubuntu.html
 ubuntu git 源码编译安装
git是流行的分布式版本控制系统,从ubuntu官网下载iso镜像安装完10.10 desktop版后,默认没有安装git客户端。


本文发布时最新的git版本是1.7.4.3


    安装git依赖的工具和库
    sudo apt-get build-dep git-core git-doc


    从github.com下载并解压git源码
    wget -O git-v1.7.4.3.tar.gz --no-check-certificate https://github.com/git/git/tarball/v1.7.4.3
    tar xf git-v1.7.4.3.tar.gz
    cd git-git-b3229df


    编译
    make prefix=/usr/local all doc
    如果此时编译报错
    fatal error: openssl/ssl.h: No such file or directory
    说明ssl开发包还没安装,运行
    sudo apt-get install libssl-dev


    安装
    sudo make prefix=/usr/local install install-doc install-html


安装完成后运行git --version测试 
Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐