美文网首页
Suse安装git记录.md

Suse安装git记录.md

作者: 7f2aceb77681 | 来源:发表于2018-11-22 15:49 被阅读5次

    服务器环境

    Linux version 3.0.76-0.11-default (geeko@buildhost) (gcc version 4.3.4 [gcc-4_3-branch revision 152973] (SUSE Linux) ) #1 SMP Fri Jun 14 08:21:43 UTC 2013 (ccab990)
    

    方法一:zypper

    # suse中使用zypper命令安装
    zypper install git
    

    然而公司测试服务器返回:

    zypper: /lib64/libz.so.1: version `ZLIB_1.2.3.3' not found (required by /usr/lib64/libzypp.so.908)
    

    尝试安装ZLIB_1.2.3.3,出来一堆依赖包,无果。之后google也找不到解决方案,放弃。

    方法二:源码安装

    源码下载:https://mirrors.edge.kernel.org/pub/software/scm/git/

    编译安装:

    $ tar -zxf git-2.9.5.tar.gz 
    $ cd git-2.9.5
    $ make configure
    $ ./configure --prefix=/usr
    $ make all doc info
    $ sudo make install install-doc install-html install-info
    

    执行:make all doc info报如下错误:

    image.png

    需要安装依赖包:zlib-devel

    rpm -ivh zlib-devel-1.2.3-3.x86_64.rpm
    

    之后便很顺畅了:)

    其它

    • 查看git版本:git version
    • 搜索zlib包:rpm -ql zlib
    • 安装后git位置:/usr/bin/git

    后话

    在公司测试服务器上安装git是为部署持续集成,git应该是装好了,但是在jenkins上配置任务时,报以下错误,zypper包管理工具不可用,手动下载依赖包都没解决这个问题,暂时放弃了。

    stderr: fatal: Unable to find remote helper for 'https'
    

    查阅:http://landcareweb.com/questions/1125/zai-git-cloneqi-jian-wu-fa-zhao-dao-https-de-yuan-cheng-zhu-shou

    相关文章

      网友评论

          本文标题:Suse安装git记录.md

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