解决 centos使用node 报错 version ‘GLIBC_2.27’ not found…
完整报错
node -v node: /lib64/libm.so.6: version `GLIBC_2.27' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.25' not found (required by node) node: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by node) node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)
## 升级 make wget https://ftp.gnu.org/gnu/make/make-4.3.tar.gz tar -xzvf make-4.3.tar.gz rm 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
## 重新编译上一步的glibc cd /root/glibc-2.28/build ../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin ## 安装glibc make && make install
验证glibc版本
此时再查看一下glibc版本
strings /lib64/libc.so.6 |grep GLIBC_
会发现所需版本已经安装好了。继续执行node -v发现依然会报错,但少了两个
node -v # node: /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by node) # node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by node) # node: /lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by node)