Centos下安装git高版本2.1.2
安装依赖软件
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel asciidoc
# yum install gcc perl-ExtUtils-MakeMaker
卸载系统自带的底版本git(1.7.1)
# git --version
git version 1.7.
# yum remove git
编译安装最新的git版本
链接:https://pan.baidu.com/s/1YnhtIN4ZJmbcv4ohQ81Evg 密码:hgd4 //百度云下载地址,下载好放到/usr/local/src
cd /usr/local/src/ # tar -vxf git-2.1..tar
# cd git-2.1.
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/profile
# source /etc/profile # git --version
git version git-2.1.
======================================================================
如果是非root用户使用git,则需要配置下该用户下的环境变量
$ echo "export PATH=$PATH:/usr/local/git/bin" >> ~/.bashrc
$ source ~/.bashrc
$ git --version
git version git-2.1.
可能遇到报错:utf8.c:463: undefined reference to `libiconv'
LINK git-credential-store
libgit.a(utf8.o): In function `reencode_string_iconv':
/usr/src/git-2.8./utf8.c:: undefined reference to `libiconv'
libgit.a(utf8.o): In function `reencode_string_len':
/usr/src/git-2.8./utf8.c:: undefined reference to `libiconv_open'
/usr/src/git-2.8./utf8.c:: undefined reference to `libiconv_close'
/usr/src/git-2.8./utf8.c:: undefined reference to `libiconv_open'
collect2: ld returned exit status
make: *** [git-credential-store] Error
解决如下:
一.安装libiconv
# cd /usr/local/src
# 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
二.创建一个软链接到/usr/lib
# ln -s /usr/local/lib/libiconv.so /usr/lib
# ln -s /usr/local/lib/libiconv.so. /usr/lib
三.然后回到git目录继续编译
# cd /usr/local/scr/git-2.8.
# make configure
# ./configure --prefix=/usr/local --with-iconv=/usr/local/libiconv
# make
# make install
四.检查一下版本号
# git --version
Centos下安装git高版本2.1.2的更多相关文章
- linux(centos)下安装git并上传代码些许步骤(亲自验证过的步骤)
曾经听说了好多次github,但直到近期才第一次学习使用github来托管自己在linux下的代码! 说实话.我自己在使用的时候从网上查了好多教程.但总认为难以掌握(步骤过于繁琐),自己操作的时候还 ...
- linux(centos)下安装git并上传代码
cat /etc/redhat-release 查看系统版本信息 >>CentOS Linux release 7.4.1708 (Core) 背景:我已经注册了github账号,之前 ...
- Linux(CentOS)下安装git
上个月把VPS迁到budgetVM,终于不用再受digitalOcean的气了,入手很方便,重点是支持支付宝付款——paypal的界面真是不习惯,开通速度挺快的,1G的内存够我折腾一段时间了~,额外送 ...
- Centos下安装git的web服务器
直接上代码 [Shell] 纯文本查看 复制代码 ? 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 ...
- 在CentOS下安装Git
1.安装git依赖包 yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUti ...
- 如何在linux centos下安装git(转)
今天想开通github的服务,于是在服务器上安装git,百度到的结果千篇一律的全都有错误,给大家总结分享下. 如果yum install git可以直接安装的可以不通过源码编译安装. 源码安装步骤如下 ...
- CentOS下安装Git
在终端输入命令:yum install git,此时会进行提示安装,输入y, 在这种安装方式下,速度很快(windows系统下下载客户端速度超慢),当出现安装完毕时,就可以了. 安装完毕后输入git ...
- centos下安装lnmp各个版本的几种方法
首先我们用一种yum的方法安装,我们需要rpm源 默认的版本太低了,手动安装有一些麻烦,想采用Yum安装的可以使用下面的方案: 1.检查当前安装的PHP包 yum list installed | g ...
- CentOS下安装python3.x版本
现在python都到了3.x版本,但是centos中自带的python仍然是2.7版本的,所以想把python换成3.x版本的. 但是这个地方有个坑,你要是直接编译安装了python3.x之后,估计你 ...
随机推荐
- C#控制台窗口居中显示(转)
private struct RECT { public int left, top, right, bottom; } [DllImport("kernel32.dll", Se ...
- matlab中norm函数的用法
格式:n=norm(A,p) 功能:norm函数可计算几种不同类型的矩阵范数,根据p的不同可得到不同的范数 以下是Matlab中help norm 的解释 NORM Matrix or vecto ...
- NLP-python 自然语言处理01
# -*- coding: utf-8 -*- """ Created on Wed Sep 6 22:21:09 2017 @author: Administrator ...
- Oracle体系结构之数据库启动的不同状态
数据库启动的不同状态: nomount状态:spfile和plile mount状态:control file open状态:data file和redo file 启动数据库的过程:nomount状 ...
- 安装JIRA
参考链接:https://www.cnblogs.com/houchaoying/p/9096118.html mysql-connector插件下载: https://mvnrepository.c ...
- 简单利用gulp-babel搭建es6转es5环境
es6是什么?借着这个话题,我想说:身为web前端的工作者连es6没听说,转行吧. demo的代码如下: 源码下载 或者 gitclone地址: git@git.oschina.net:sisheb/ ...
- idong常用js总结
1.判断屏幕高度 $(document).ready(function() { $("#left").height($(window).height()); $(&qu ...
- ListView and gridview常用属性
刷新:notifyDataSetChanged 1.gridview常用属性 GridView的一些特殊属性: 1.Android:numColumns=”auto_fit” //GridVi ...
- 001-将自己的jar提交maven中央仓
一.Maven中央仓库提交过程 ① https://issues.sonatype.org 工单管理地址,就是申请上传资格和groupId 的地方. ② https://oss.sonatype.or ...
- 超级详细的RedGateSqlServer工具教程,效率提高的不止一点点之SQLPrompt
距离上次SQLDoc教程贴过去2个月了,时间真快,好了,废话不多说,继续 http://pan.baidu.com/share/link?shareid=177401896&uk=330822 ...