奶爸

Golang编译失败 gcc: internal compiler error: Killed (program cc1)
gcc: internal compiler error终端报错 gcc: internal compiler e...
扫描右侧二维码阅读全文
05
2018/03

Golang编译失败 gcc: internal compiler error: Killed (program cc1)

gcc: internal compiler error

终端报错 gcc: internal compiler error: Killed (program cc1) ,起初还以为其中某 cgo 包的问题,后面查了半天发现是内存不足。

创建临时分区

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
sudo mkswap /swapfile
sudo swapon /swapfile

重新编译,编译完成后删除临时分区。

删除临时分区

sudo swapoff /swapfile
sudo rm /swapfile
Last modification:March 5th, 2018 at 09:33 am

Leave a Comment