linux升级软件(升级glibc2.33)

一:gdb升级到gdb-12.1

yum install binutils texinfo bison gettext

yum install gcc-c++
yum install gmp-devel.x86_64

wget http://ftp.gnu.org/gnu/gdb/gdb-12.1.tar.gz
tar -zxvf gdb-12.1.tar.gz
cd gdb-12.1
mkdir build
../configure --prefix=/usr
make
make install

报错:missing: line 81: makeinfo: command not found 

解决方法: yum -y install texinfo

二:gcc升级到gcc-11.2

#下载软件包
wget https://mirrors.aliyun.com/gnu/gcc/gcc-11.2.0/gcc-11.2.0.tar.gz
#解压依赖包
tar -zxf gcc-11.2.0.tar.gz
cd gcc-11.2.0/
#下载4个依赖包
./contrib/download_prerequisites
#预编译
mkdir build
cd build
../configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
#查看cpu核数
cat /proc/cpuinfo| grep “processor”| wc -l
#-j4中的数字为cpu核数,及并发工作任务数量,可以提高编译效率
make -j4
#编译安装
make install
#检查gcc版本
[root@s144 build]# gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-pc-linux-gnu/9.3.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: …/configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
Thread model: posix
gcc version 11.2.0 (GCC)

三:升级make到4.3 

[root@Subnet-100-223 ~]# wget https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz
[root@Subnet-100-223 ~]# tar -zxf make-4.3.tar.gz
[root@Subnet-100-223 ~]# cd make-4.3/
[root@Subnet-100-223 make-4.3]# mkdir build
[root@Subnet-100-223 build]# cd build
[root@Subnet-100-223 build]# ../configure --prefix=/usr
[root@Subnet-100-223 build]#make
[root@Subnet-100-223 build]#make install
…
[root@Subnet-100-223 build]# make -v
GNU Make 4.3

四:升级glibc2.33 

glibc2.33对应gcc-11.2.0版本

这个版本必须对应,不然会安装失败

wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.33.tar.gz
tar -zxvf glibc-2.31.tar.gz
yum -y install bison
[root@Subnet-100-223 glibc-2.33]# mkdir build;cd build/
[root@Subnet-100-223 build]# ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror
[root@Subnet-100-223 build]# make
[root@Subnet-100-223 build]# make install
#安装locale
[root@Subnet-100-223 build]# make localedata/install-locales
[root@Subnet-100-223 build]# strings /lib64/libc.so.6 | grep GLIBC

  • 3
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值