Eric Guo's

Hoping writing JS, Ruby & Rails and Go article, but fallback to DevOps note

Resolve G++ Error Unrecognized Command Line Optionstd=c++14


When I try to deploy next 10 in CentOS 7, which required a npm package deasync which using C++ 14 feature, but the CentOS 7 gcc not support, so below is how to resolved.

yum list | grep gcc
yum install centos-release-scl-rh
yum install llvm-toolset-7-clang
yum install centos-release-scl
yum install devtoolset-7-gcc.x86_64 && yum install devtoolset-7-gcc-c++.x86_64
# or yum install devtoolset-7-toolchain
scl enable devtoolset-7 bash
yarn install

You only need to enable devtoolset-7 once when do the yarn install, after that the node_modules will having the library so no need enable in every deploy.