问题
最近腾讯云查看node版本的时候突然报node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
如下:
[root@VM-16-10-centos ~]# node
node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node)
node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node)
上网查资料,都说node版本太高,需要升级系统的gcc
升级gcc
当前环境
系统:centos 7 x86_64
gcc版本:gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC)
make版本:GNU Make 4.3
升级gcc和make
升级GCC(默认为4 升级为8)
yum -y install centos-release-scl
yum -y install devtoolset-8-gcc devtoolset-8-gcc-c++ devtoolset-8-binutils
scl enable devtoolset-8 bash
echo "source /opt/rh/devtoolset-8/enable" >>/etc/profile
使配置文件生效
[root@PC1 build]# source /etc/profile ## 使配置文件生效
[root@PC1 build]# gcc --version ## 查看gcc版本
gcc (GCC) 8.3.1 20190311 (Red Hat 8.3.1-3)
Copyright (C) 2018 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.
升级 make
升级 make(默认为3 升级为4)
wget http://ftp.gnu.org/gnu/make/make-4.3.tar.gz
tar -xzvf make-4.3.tar.gz && cd make-4.3/
./configure --prefix=/usr/local/make
make && make install
cd /usr/bin/ && mv make make.bak
ln -sv /usr/local/make/bin/make /usr/bin/make
````
## 错误
## 错误访问download.docker.com
这是由于国内访问不到docker官方镜像的缘故
可以通过aliyun的源来完成:
sudo yum-config-manager –add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
出现以下内容则表示docker仓库配置成功:
Loaded plugins: fastestmirror
adding repo from: http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
grabbing file http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo to /etc/yum.repos.d/docker-ce.repo
repo saved to /etc/yum.repos.d/docker-ce.repo
# 参考
[1] [Linux升级gcc到最新版本gcc-11.2.0](https://blog.csdn.net/qq_41054313/article/details/119453611)<br>
[2][Centos7五步安装Docker并解决docker官方镜像无法访问问题](https://blog.csdn.net/doegoo/article/details/80062132)<br>
[3][These critical programs are missing or too old: compiler](https://www.cnblogs.com/liujiaxin2018/p/17557225.html)<br>
[4][node: /lib64/libm.so.6: version `GLIBC_2.27‘ not found问题解决方案 _](https://www.cnblogs.com/yuwen01/p/18067005)<br>
br>