前端之家收集整理的这篇文章主要介绍了
centos下 升级git,
前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
转载:https://www.molloc.com/archives/568
转载:http://www.111cn.net/sys/CentOS/82593.htm
# yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel
# yum install gcc perl-ExtUtils-MakeMaker
卸载Centos自带的git1.7.1
通过git –version查看系统带的版本,Cento6.5应该自带的是git版本是1.7.1
# yum remove git
下载git2.1.2并将git添加到环境变量中
安装git并添加到环境变量中
# cd git-2.1.2
# make prefix=/usr/local/git all
# make prefix=/usr/local/git install
# echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
# source /etc/bashrc
注意
执行make prefix=/usr/local all 报以下错误信息:
@H_
404_30@
|
libgit
.a
(
utf8
.o
)
:
In
function
`
reencode_string
_iconv'
:
/
usr
/
local
/
git
/
utf8
.c
:
463
:
undefined
reference
to
`
libiconv'
libgit
.a
(
utf8
.o
)
:
In
function
`
reencode_string
_len'
:
/
usr
/
local
/
git
/
utf8
.c
:
502
:
undefined
reference
to
`
libiconv
_open'
/
usr
/
local
/
git
/
utf8
.c
:
521
:
undefined
reference
to
`
libiconv
_close'
/
usr
/
local
/
git
/
utf8
.c
:
515
:
undefined
reference
to
`
libiconv
_open'
collect2
:
ld
returned
1
exit
status
make
:
*
*
*
[
git
-
credential
-
store
]
Error
1
|
libiconv历史简介
随着互联网时代的到来,通过互联网进行
文字交流也逐渐增多:浏览外国的网站,这个时候字符编码的转换变得尤为重要。这带来了一个问题,就是许多字符在某一种编码方式中没有。为了
解决这种混乱,Unicode的编码方式被建立。Unicode是一种超级编码包含了所有这些编码的字符集,因此一些新的文本格式像XML的默认编码方式就是Unicode.
但是很多老式的计算机还在使用当地的传统的字符编码方式。而一些程序,例如
邮件程序和浏览器必须能在这些不同的
用户编码之间作转换。其他的一些程序则内置
支持Unicode,以顺利
支持国际化的处理,但是仍然有在Unicode和其他的传统编码之间转换的需求。GNU的libiconv就是为这两种应用设计的编码转换库。
解决方法如下:
1.安装libiconv
6
7
cd
/
usr
/
local
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
|
2.创建一个软链接到/usr/lib
ln
-
s
/
usr
/
local
/
lib
/
libiconv
.so
/
usr
/
lib
ln
-
s
/
usr
/
local
/
lib
/
libiconv
.so
.
2
/
usr
/
lib
|