把自己笔记本上的glibc和kernel升级了一下
glibc升级方法:
首先升级make:
1、升级gcc到9.2.0(请参考我的另一遍博文)
2、安装Python3.8.0
3、升级GNU Make 3.82到4.2.1(及以上任意版本)
https://mirrors.tuna.tsinghua.edu.cn/gnu/make
mkdir build
cd build
../configure --prefix=/usr && make && make install
4.2020-08更新,若centos8没有texinfo,则还需手动安装texinfo。下载texinfo安装包后
./configure && make -j4 && make install -j4即可。
查看自己glibc版本
strings /lib64/libc.so.6 |grep GLIBC_2
1.下载glibc:Index of /gnu/glibc/ | 清华大学开源软件镜像站 | Tsinghua Open Source Mirror
2.解压到任意文件夹(根目录除外)
3.mkdir temp&&cd temp
4.
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werror #很多教程没有最后两个参数,结果就是1.编译时间超长2.编译出现不明错误
5.make -j8&&make install -10
注意:在最后会因为缺少-lness-test*而停止,其具体表现为
- Did you change the gcc specs file (necessary after upgrading from
Linux libc5)?
- Are there any symbolic links of the form libXXX.so to old libraries?
Links like libm.so -> libm.so.5 (where libm.so.5 is an old library) are wrong,
libm.so should point to the newly installed glibc file - and there should be
only one such link (check e.g. /lib and /usr/lib)
You should restart this script from your build directory after you've
fixed all problems!
Btw. the script doesn't work if you're installing GNU libc not as your
primary library!
不需要处理,看到这里即视为安装成功
6.[已编辑]现在的glibc比以前好用多了,不需要再自己设置动态库(大部分系统,少部分发现此时仍然没有升级glibc版本的人可以查阅其他文章或通过rpm升级)
7.
make localedata/install-locales # 用来处理安装glibc后中文变乱码的现象,几乎所有教程没有,这就"安装失败"了
8.安装成功
感谢CentOS 7.6 编译安装最新版本glibc2.30 实录_links like libm.so -> libm.so.5 (where libm.so.5 i-CSDN博客
及其作者