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之后,估计你 ...
随机推荐
- POJ_3368_Frequent values
Frequent values Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 19998 Accepted: 7180 ...
- CCCC L2-013. 红色警报 连通分量
题解:将问题转化成连通分量.每次失去一座城市,切断其所有的边,算一次现在的连通分量.若增量大于1,则发出警报. 至于如何算连通分量,直接用tarjan模板 坑://我昨天晚上半夜敲的模板,把一个算所有 ...
- ndk http://www.th7.cn/Program/Android/201412/334955.shtml
http://www.th7.cn/Program/Android/201412/334955.shtml http://ruikye.com/2014/08/30/androidstudio_ndk ...
- 数据库之char vchar nchar nvchar的区别
转自:http://blog.csdn.net/a11112244444/article/details/51475107 首先介绍一下定长或变长 所谓定长就是长度固定的,当输入的数据长度没有达到指定 ...
- 常用的windows注册表大全
目录 使系统没有“运行”选项 1让操作系统无“关闭系统” 选项 2让操作系统无“注销”选项 ...
- 聊一聊Linux中的工作队列2
上一篇文章对工作队列原理以及核心数据结构做了简单介绍,本文重点介绍下workqueue的创建以及worker的管理. 一.工作队列的创建(__alloc_workqueue_key) struct w ...
- 高并发秒杀系统方案(JSR303参数校验)
<dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring- ...
- android studio 布局
1) 可见(visible)XML文件:Android:visibility="visible"Java代码:view.setVisibility(View.VISIBLE); 2 ...
- poj3468A Simple Problem with Integers(线段树的区域更新)
http://poj.org/problem?id=3468 真心觉得这题坑死我了,一直错,怎么改也没戏,最后tjj把q[rt].lz改成了long long 就对了,真心坑啊. 线段树的区域更新. ...
- python3中pymysql模块安装及连接数据库(同‘python安装HTMLTestRunner’)
https://pypi.org/project/PyMySQL/#files 安装完成之后就是连接数据库了 机器上安装了mysql的数据库,并且已经创建了两张表用于测试 python3连接数据库及删 ...