5
redhat 7 升级glibc2.31
source link: https://blog.51cto.com/liufengleo/5327733
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
redhat 7 升级glibc2.31
原创一 配置本地 yum
vi /etc/yum.repos.d/yum.repo
[base]
name=Local
baseurl=file:///mnt
gpgcheck=0
enabled=1
mount /dev/cdrom /mnt/
yum install gcc gcc-c++ m4 python3 bison fontconfig-devel libXpm-devel texinfo
二 安装GCC升级依赖
下载地址ftp://gcc.gnu.org/pub/gcc/infrastructure/
存放目录 建议统一放置 /opt
安装GMP:
tar -jxvf gmp-6.1.0.tar.bz2
cd gmp-6.1.0
./configure
make && make install
安装MPFR:tar -jxvf mpfr-3.1.4.tar.bz2
cd mpfr-3.1.4
./configure
make && make install
安装MPC:tar -zxvf mpc-1.0.3.tar.gz
cd mpc-1.0.3
./configure
make && make install
三 升级 gcc 9.3.0
wget https://mirrors.aliyun.com/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
cp gcc-9.3.0.tar.gz /opt
cd /opt tar -zxf gcc-9.3.0.tar.gz cd gcc-9.3.0/
mkdir build
cd build
../configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usr
make && make install
cd /usr/lib64
ll libstdc++*
gcc -v
gcc --version
四 升级make
wget https://mirrors.aliyun.com/gnu/make/make-4.3.tar.gz
cp make-4.3.tar.gz /opt
cd /opt/
tar -zxf make-4.3.tar.gz
cd make-4.3/
mkdir build
cd build
../configure --prefix=/usr && make && make install
make -v
五 升级glibc2.31
cd /opt
wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.31.tar.gz
tar -zxf glibc-2.31.tar.gz
cd glibc-2.31/
cat INSTALL | grep -E "newer|later"
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror
yum install python3
make && make install
make localedata/install-locales
最后验证升级后的glibc版本
ll /lib64/libc.so*
strings /lib64/libc.so.6 | grep GLIBC
- 赞
- 收藏
- 评论
- 分享
- 举报
Recommend
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK