git安装全教程

我用的是centos(如已安装低版本git,使用sudo yum remove git卸载)

    首先确保安装了依赖的包:

        sudo yum install curl curl-devel zlib-devel openssl-devel perl cpio expat-devel gettext-devel

然后下载最新的git包:

    wget https://github.com/huangyucai/hyc/blob/master/git-latest.tar.gz

    tar -zvxf git.latest.tar.gz

    cd git-{date}

    autoconf

    ./configure

    make(可能会出现can't locate ExtUtils/MakeMaker.pm.......错误,是因为缺少perl-ExtUtils-MakeMaker package,使用sudo yum install perl-ExtUtils-MakeMaker package后再次make)

    make install

即安装完成

你可能感兴趣的:(git安装)