linux 安装最新版本的git
#linux 安装最新版本的git
下载源代码
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安装依赖环境(以CentOS为例)
sudo yum install -y openssl-devel libpcre-devel perl-ExtUtils-Embed libcurl-devel配置安装
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可能导致编译失败