配置环境变量后解决 /etc/php/7.0/fpm/pool.d/www.conf 重启fpm后编译命令生效 命令g++ spj.cc -o spj 2>&1成功执行0 转载于:https://www.cnblogs.com/wang0535/p/11039933.html