CentOS 6 glibc升级到2.15
2017-04-11 0条评论 1,357次阅读 1人点赞
CentOS6.X默认的glibc版本最高为2.12,但实际应用中,许多项目所依赖的包往往需要更高版本的glibc库支持。
方法一
适用于CentOS 6 x64:
准备工作
1、升级系统
2、安装kernel-headers
|
yum
install
kernel
-
headers
-
y
|
3、安装gcc
|
yum
-
y
install
gcc
gcc
-
c
++
|
4、更新glibc list
|
yum
update
glibc
yum
list
glibc
|
升级glibc 版本,把下面的代码复制到linux中运行
1
2
3
4
5
6
7
8
9
10
11
12
|
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-utils-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-headers-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-static-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-common-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-2.15-60.el6.i686.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/glibc-devel-2.15-60.el6.x86_64.rpm
wget
-
c
ftp
:
//ftp.pbone.net/mirror/ftp.sourceforge.net/pub/sourceforge/f/fu/fuduntu-el/el6/current/UNSTABLE/RPMS/nscd-2.15-60.el6.x86_64.rpm
sudo
rpm
-
e
--
nodeps
--
justdb
glibc
-
2.
*
.
i686
--
allmatches
rpm
-
Uvh
*
-
2.15
-
60.el6.x86_64.rpm
rpm
-
Uvh
glibc
-
2.15
-
60.el6.i686.rpm
ldconfig
|
首先是一些关键包,nscd可以不要,但为了防止个别使用了nscd的,所以顺便更新了。
这个时候,便已将glibc更新到2.15版本。
64位下,经常同时安装了x86_64和i686版本的glibc,升级需要先卸载i686版本,然后执行更新,再重新安装i686版本(部分程序在编译需要32位的库)。
查看系统glibc版本可使用如下命令:
|
ls
-
l
/
lib64
/
libc
.so
.
6
|
详细glibc支持可以用以下命令查看:
|
strings
/
lib64
/
libc
.so
.
6
|
grep
GLIBC_
|

方法二
准备工作如方法一,不再重复。
|
mkdir
glibc
cd
glibc
wget
-
c
http
:
/
/
ftp
.redsleeve
.org
/
pub
/
steam
/
glibc
-
2.15
-
60.el6.x86_64.rpm
wget
-
c
http
:
/
/
ftp
.redsleeve
.org
/
pub
/
steam
/
glibc
-
common
-
2.15
-
60.el6.x86_64.rpm
wget
-
c
http
:
/
/
ftp
.redsleeve
.org
/
pub
/
steam
/
glibc
-
devel
-
2.15
-
60.el6.x86_64.rpm
wget
-
c
http
:
/
/
ftp
.redsleeve
.org
/
pub
/
steam
/
glibc
-
headers
-
2.15
-
60.el6.x86_64.rpm
wget
-
c
http
:
/
/
ftp
.redsleeve
.org
/
pub
/
steam
/
nscd
-
2.15
-
60.el6.x86_64.rpm
|
rpm包下载完成后执行以下命令
|
rpm
-
Uvh
glibc
-
2.15
-
60.el6.x86_64.rpm
\
glibc
-
common
-
2.15
-
60.el6.x86_64.rpm
\
glibc
-
devel
-
2.15
-
60.el6.x86_64.rpm
\
glibc
-
headers
-
2.15
-
60.el6.x86_64.rpm
\
nscd
-
2.15
-
60.el6.x86_64.rpm
|

转https://www.234du.com/post-1022.html
CentOS 6 glibc升级到2.17及安装ntfs-3g
下载完成后
1
2
3
4
5
6
7
|
tar –zxvf glibc-
2.17
.tar.gz
cd glibc-
2.17
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make –j4
make install
|
通过yum安装nfts-3g即可达到目的
wget -O /etc/yum.repos.d/epel.repo http://mirrors.aliyun.com/repo/epel-7.repo //下载yum仓库文件
yum update