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之后,估计你 ...
随机推荐
- ABP之应用服务(1)
在一个理想的层级项目中,展现层是不能直接访问领域对象的,那么展现层如何获取到自己需要的数据呢?也就是今天的主角-Application层,它的职责就是为展现层服务,它通过仓储获取到相应的数据,然后将数 ...
- Oracle卸载之Win7操作系统下Oracle11g 数据库卸载过程图解
1.首先停止oracle11g数据库的5个服务 右键“计算机”,在下拉菜单列表中单击“管理”,进入计算机管理器.图解步骤如下: 选择左侧工具栏最后一项“服务和应用程序”,点击进入下拉菜单,单击“服务” ...
- Time Profiler Instrument分析卡顿
https://www.jianshu.com/p/080108c969e8 启动Time Profile:Xcode ——> Product ——> Profile ——> Tim ...
- python3.5 安装python3-tk
https://blog.csdn.net/qq_18293213/article/details/74483516 在python3.5下安装好matplotlib后,准备显示一张图片测试一下,但是 ...
- River Crossing---河南省第六届大学生程序设计竞赛
题目描述 Afandi is herding N sheep across the expanses of grassland when he finds himself blocked by a ...
- 洛谷P1850 换教室 [noip2016] 期望dp
正解:期望dp 解题报告: 哇我发现我期望这块真的布星,可能在刷了点儿NOIp之后会去搞一波期望dp的题...感觉连基础都没有打扎实?基础概念都布星! 好那先把这题理顺了嗷qwq 首先我们看到期望就会 ...
- iOS中textbox文本框清除圆角
在iOS.Mac safari中,所有的textbox, select, checkbox都会被强制美化为圆角.但在特殊情况下需要清除圆角时发现iOS中使用以下传统的css无效: border-rad ...
- python爬虫CSDN文章抓取
版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/nealgavin/article/details/27230679 CSDN原则上不让非人浏览訪问. ...
- SVN出现xcrun: error: invalid active developer path(Mac)
Mac升级了系统,配置PHPStorm的SVN,出现如下错误: 具体提示的内容是:xcrun: error: invalid active developer path (/Library/Devel ...
- [vue]v-bind: sytle/class-bind&属性值绑定
v-bind - style绑定 - class绑定 - 属性值绑定 <!DOCTYPE html> <html lang="en"> <head&g ...