g++: internal compiler error: Killed (program cc1plus)

     make編譯代碼時候,提示 g++: internal compiler error: Killed (program cc1plus) ,其詳細報錯信息如下:

g++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
.......
Error 4

如圖1所示:
在這裏插入圖片描述
                                    圖1 編譯報錯信息


      google一番,得到的統一答案是是因爲內存不足, free 看了下系統內存使用情況,果真是被佔用完了。因爲該設備爲公司的統一編譯平臺(有若干同事在使用),所以這也不足爲奇。如圖2所示:
在這裏插入圖片描述
                                    圖2 free -h 詳情


可採取如下方案來解決問題:

     (1) sudo dd if=/dev/zero of=/swapfile bs=64M count=16(count的大小就是增加的swap空間的大小,64M是塊大小,所以空間大小是bs*count=1024MB)
     (2)sudo mkswap /swapfile (把剛纔空間格式化成swap格式)
     (3)sudo swapon /swapfile (使用剛纔創建的swap空間)






     
     
     
     
     
     
     
     
     

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章