centos通过nodejsj源码安装
报错信息
node安装完成之后使用node -v提示报错信息
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.5' not found (required by node)
node: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by node)
提示缺少GLIBC
秉着缺啥补啥的太多直接安装
根据下面这个教程进行
https://tech1024.com/original/3021
安装gcc报错信息
通过国内镜像安装快一些。源站太慢
https://cloud.tencent.com/developer/article/1424725
命令
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
报错提示
configure: error: Building GCC requires GMP 4.2+, MPFR 2.4.0+ and MPC 0.8.0+.
解决办法
安装下面这些库
sudo yum install gmp gmp-devel mpfr mpfr-devel libmpc libmpc-devel
然后接着编译
../configure --enable-checking=release --enable-languages=c,c++ --disable-multilib
执行这个命令
make && make install
漫长的等待过程