zoukankan      html  css  js  c++  java
  • CentOS安装Git

    准备安装Git
    yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel

    #下载git-1.8.5.2.tar.gz 到 /usr/local/src 下载网址 http://code.google.com/p/git-core

    cd /root/download
    tar -zvxf git-1.8.5.2.tar.gz 
    cd git-1.8.5.2

    ./configure --prefix=/usr/local/git

    make && make install

    报错了吧?

    libgit.a(utf8.o):Infunction`reencode_string_iconv':
    /root/git-1.8.3.2/utf8.c:530: undefined reference to `libiconv'
    libgit.a(utf8.o): In function `reencode_string_len':/root/git-1.8.3.2/utf8.c:569:undefined reference to `libiconv_open'
    /root/git-1.8.3.2/utf8.c:588: undefined reference to `libiconv_close'
    /root/git-1.8.3.2/utf8.c:582: undefined reference to `libiconv_open'

    这是缺少libiconv库

    手工安装 libiconv

    $cd /root/download
    $wget http
    ://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.14.tar.gz $tar -zxvf libiconv-1.14.tar.gz $cd libiconv-1.14 $ ./configure --prefix=/usr/local/libiconv $ make $ make install

    再回到 git-1.8.5.2 目录

    cd /root/download/git-1.8.5.2
    make && make install
    安装成功,试一下
    git --version
    git version 1.8.5.2


  • 相关阅读:
    自定义Python枚举
    解决Django跨域访问的问题
    BBS项目细节总结
    面向对象进阶
    面向对象
    三级菜单
    常用模块
    内置函数与匿名函数及递归
    迭代器和生成器
    函数
  • 原文地址:https://www.cnblogs.com/imbin/p/3502324.html
Copyright © 2011-2022 走看看