zoukankan      html  css  js  c++  java
  • git安装--linux下的安装

    一般linux自带git版本很旧,会有一定问题,可以先卸载系统自带git:

    yum remove git
    下载及安装git:

    wget https://github.com/git/git/archive/v2.2.1.tar.gz
    tar zxvf v2.2.1.tar.gz
    cd git-2.2.1
    make configure
    ./configure --prefix=/usr/local/git/ --with-iconv=/usr/local/libiconv --with-curl=/home/{username}/curl/
    make
    make install
    echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
    source /etc/bashrc

    配置curl很重要。 
    可能出现的问题,少一些系统库: 
    1.编译git时报错: zlib.h: No such file or directory
    缺少 zlib的头文件, 开发包没装,

    yum install zlib (系统默认已经装上)
    yum install zlib-devel

    解决

    2.提示make cc Command not found

    yum install gcc
    3.make[1]: * [perl.mak] Error 2 make: * [perl/perl.mak] Error 2
    执行:

    yum install perl-ExtUtils-MakeMaker package.
    进行安装 
    出现错误二: 
    /bin/sh: msgfmt: command not found

    yum install gettext-devel
    可解决!

    4./bin/sh: line 1: asciidoc: command not found
    安装asciidoc: 
    到官网下载asciidoc 
    http://www.methods.co.nz/asciidoc/index.html 
    http://sourceforge.net/projects/asciidoc/

    cp asciidoc-8.5.2.tar.gz /root/src
    cd /root/src
    tar xvfz asciidoc-8.5.2.tar.gz
    cd asciidoc-8.5.2
    ./configure
    sudo make install
    5./bin/sh: line 1: xmlto: command not found

    yum install xmlto
    6.如果出现http/https异常,安装curl

  • 相关阅读:
    Shell 数组
    Shell 中的中括号用法总结
    设置Linux可以查看历史命令(history)的执行时间
    jasypt 对 配置文件密码进行加密处理
    今日进度
    今日进度
    今日进度
    今日进度
    今日进度
    每周总结
  • 原文地址:https://www.cnblogs.com/xuange306/p/5979125.html
Copyright © 2011-2022 走看看