Linux Git 源码安装

作者: yangqing | 来源:发表于2020-05-08 16:22 被阅读0次

    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
    

    相关文章

      网友评论

        本文标题:Linux Git 源码安装

        本文链接:https://www.haomeiwen.com/subject/pcgfnhtx.html