centos解决“c++: internal compiler error: Killed (program cc1plus)”错误


1.问题描述
在测试vm上编译安装mysql的时候报了一个错

c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report

主要是在编译过程中,内存不够造成的。
2.解决方案

使用swap创建临时分区
sudo dd if=/dev/zero of=/swapfile bs=64M count=32
#count的大小就是增加的swap空间的大小,64M是块大小,所以空间大小是bs*count=2048MB
sudo mkswap /swapfile
#把刚才空间格式化成swap格式
chmod 0600 /swapfile
#该目录权限,不改的话,在下一步启动时会报“swapon: /swapfile: insecure permissions 0644, 0600 suggested.”错误
sudo swapon /swapfile
#使用刚才创建的swap空间

3.工作做完可以把临时空间关闭

swapoff -a
#详细的用法可以:swapoff --help
#查看当前内存使用情况:free -m


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM