Linux Troubleshooting

Linux Git 源码安装

2020-05-08  本文已影响0人  yangqing

Git官网源码地址:

https://mirrors.edge.kernel.org/pub/software/scm/git/

下载git源码包:

https://www.kernel.org/pub/software/scm/git/git-2.26.2.tar.gz

从源代码安装:

Git 依赖的库:autotools、curl、zlib、openssl、expat 和 libiconv。

yum -y install epel-release
yum makecache
yum -y install dh-autoreconf curl-devel expat-devel gettext-devel openssl-devel perl-devel zlib-devel
# sudo apt-get install dh-autoreconf libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev

添加文档的多种格式(doc、html、info)依赖如下:

yum -y install asciidoc xmlto docbook2X gdb-doc
# sudo apt-get install asciidoc xmlto docbook2x

编译并安装

tar -zxf git-2.26.2.tar.gz
cd git-2.26.2
./configure --prefix=/usr
make all doc info -j 4
make install install-doc install-html install-info

完成后,使用 Git 来获取 Git 的更新:

git clone git://git.kernel.org/pub/scm/git/git.git
上一篇 下一篇

猜你喜欢

热点阅读