光说有毛用


linux 安装最新版本的git

· by admin · Read in about 1 min · (37 Words)
git linux 

#linux 安装最新版本的git

  1. 下载源代码

    https://www.kernel.org/pub/software/scm/git/
    

    最新版本为2.10.0

    wget https://www.kernel.org/pub/software/scm/git/git-2.10.0.tar.gz
    
  2. 安装依赖环境(以CentOS为例)

    sudo yum install -y openssl-devel libpcre-devel perl-ExtUtils-Embed libcurl-devel
    
  3. 配置安装

    tar xvf git-2.10.0.tar.gz
    cd git-2.10.0
    ./configure --with-openssl --with-libpcre --with-expat --with-curl
    make
    sudo make install
    

    说明:
    --with-openssl --with-libpcre --with-expat --with-curl选项开启支持https
    如果不安装perl-ExtUtils-Embed可能导致编译失败

Comments