宝塔linux 安装php swoole 拓展时报错解决
时间 20 : 14 , Nov 04,2020
宝塔linux 安装php swoole 拓展时报错 cc1plus: error: unrecognized command line option "-std=c++11"
先安装 gcc 新版本
参考 http://www.vpser.net/manage/centos-6-upgrade-gcc.html
yum -y install centos-release-scl
yum -y install devtoolset-9-gcc devtoolset-9-gcc-c++ devtoolset-9-binutils
scl enable devtoolset-9 bash
需要注意的是scl命令启用只是临时的,退出shell或重启就会恢复原系统gcc版本。
如果要长期使用gcc 9.3的话:
echo "source /opt/rh/devtoolset-9/enable" >>/etc/profile
然后改变执行文件
参考 https://blog.csdn.net/lhh1113/article/details/64441802
再安装就可以了

