一、失败原因
clang++: error: unable to execute command: Killed
clang++: error: clang frontend command failed due to signal (use -v to see invocation)
二、解决方法
加大分区:
sudo fallocate -l 6G /swapfile
sudo chmod 600 /swapfile
sudo mkswap /swapfile
sudo swapon /swapfile
开机自动挂载swap:
使用 vi 在 /etc/fstab 文件底部添加如下内容:
/swapfile none swap sw 0 0