环境 Centos 7 安装环境依赖 $ yum install curl-devel gcc-c++ zlib zlib-devel perl-ExtUtils-MakeMaker package 下载git $ wget https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.45.2.tar.gz $ tar -xzvf git-2.45.2.tar.gz 安装git $ cd git-2.45.2 ./configure --prefix=/usr/local $ make $ make install