教程相关

教程:CentOS 6 更新glibc到2.15 / OpenVZ

微信扫一扫,分享到朋友圈

教程:CentOS 6 更新glibc到2.15 / OpenVZ
收藏 0 8

背景

狗博主一直喜欢用CentOS 6(就像很多人不习惯其他操作平台一样),最近又剁了几个OVZ小鸡,想着给他装GOOGLE BBR的时候,却发现glibc还停留在2.13,这里我知道的有两种更新方式,推荐使用第一种,会比较快。

OpenVZ 更新glibc到2.15

方法一:rpm安装

先下载以下几个文件:

wget http://ftp.redsleeve.org/pub/steam/glibc-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-common-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-devel-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/glibc-headers-2.15-60.el6.x86_64.rpm \
http://ftp.redsleeve.org/pub/steam/nscd-2.15-60.el6.x86_64.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

方法二:编译安装(上面的方式行不通,再用编译的方式,编译的方式相对时长会久很多)

wget http://ftp.gnu.org/gnu/glibc/glibc-2.15.tar.gz
wget http://ftp.gnu.org/gnu/glibc/glibc-ports-2.15.tar.gz
tar -zxf glibc-2.15.tar.gz
tar -zxf glibc-ports-2.15.tar.gz
mv glibc-ports-2.15 glibc-2.15/ports
mkdir glibc-build-2.15
cd glibc-build-2.15
../glibc-2.15/configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin
make all && make install

检查是否成功安装

ldd --version

成功安装的输入如下

Copyright (C) 2012 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Written by Roland McGrath and Ulrich Drepper.

成功安装完成后就可以愉快的安装bbr了,可以参考我这里的一键bbr脚本:
https://sabialab.com/bash-openvz-bbr-lkl-nanqinlang.html

本文转载自扩软博客
https://blog.kuoruan.com/

我还没有学会写个人说明!
上一篇

一键脚本:服务器一键测试脚本整合版

下一篇

VPS优惠:搬瓦工补货 / QN 机房 / 电信双程 CN2 / 年付 $18.79

你也可能喜欢

8 条评论

  1. 救活了我的vps :biggrin:

    1. @yunnan0317 能帮到你简直太好了!

  2. 请问当我更新glbic输入
    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
    之后,系统提示:
    # 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
    error: Failed dependencies:
    kernel-headers is needed by glibc-headers-2.15-60.el6.x86_64
    kernel-headers >= 2.2.1 is needed by glibc-headers-2.15-60.el6.x86_64
    glibc-common = 2.12-1.149.el6_6.4 is needed by (installed) glibc-2.12-1.149.el6_6.4.i686
    Exit code: 5
    *** End of transmission ***

    安装失败了

    1. @wayne 用另一个方式安装即可。

  3. 请注明出处:扩软博客,药店碧莲谢谢

    1. @Melon 大佬实在抱歉,可能因为更新主题后,转载标签不见导致,已添加,请见谅。

  4. 用方法一时出现以下问题:
    rpm -Uvh glibc-2.15-60.el6.x86_64.rpm
    error: Failed dependencies:
    glibc-common = 2.15-60.el6 is needed by glibc-2.15-60.el6.x86_64
    用方法二时出现以下问题:
    [root /glibc-build-2.15]# ../glibc-2.15/configure –prefix=/usr –disable-profile –enable-add-ons –with-headers=/usr/include –with-binutils=/usr/bin
    checking build system type… x86_64-unknown-linux-gnu
    checking host system type… x86_64-unknown-linux-gnu
    checking for gcc… no
    checking for cc… no
    checking for cl.exe… no
    configure: error: in `/glibc-build-2.15':
    configure: error: no acceptable C compiler found in $PATH
    See `config.log' for more details

  5. wget 第二步的时候
    STDERR: TOO MUCH DATA RECEIVED

发表评论

您的电子邮件地址不会被公开。 必填项已用 * 标注

提示:点击验证后方可评论!

插入图片

类别小工具