起项目的时候,需要编译 node-gpy
,但是在 cent os 7 下报错:
g++: 错误:unrecognized command line option ‘-std=c++14’
这是因为 gcc 版本不对,需要升级。步骤如下:
shellyum install centos-release-scl -y yum install devtoolset-10-gcc-c++ -y yum install devtoolset-10-toolchain -y scl enable devtoolset-10 zsh scl enable devtoolset-10 bash echo "#!/bin/zsh" > /etc/init.d/gcc echo "source /opt/rh/devtoolset-10/enable" >> /etc/init.d/gcc chmod +x /etc/init.d/gcc
然后再编译就对了
本文作者:mereith
本文链接:
版权声明:本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!