make 报错c++: internal compiler error: Killed (program cc1plus)

.
.
.
[ 59%] Built target sql_dd
[ 60%] Built target slave
[ 60%] Building CXX object sql/CMakeFiles/sql_gis.dir/item_geofunc_setops.cc.o
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See  for instructions.
make[2]: *** [sql/CMakeFiles/sql_gis.dir/item_geofunc_setops.cc.o] Error 4
make[1]: *** [sql/CMakeFiles/sql_gis.dir/all] Error 2
make: *** [all] Error 2

内存不足出错

解决方法:增加swap space 交换空间

1、创建空文件

/media/swapfile.img只是一个实例文件,这个文件你可以自定义创建任意一个空白文件

dd if=/dev/zero of=/media/swapfile.img bs=1024 count=1M

2、生成文件交换系统

mkswap /media/swapfile.img

3、设置开机启动

# Add this line to /etc/fstab
vim /etc/fstab

//加入
/media/swapfile.img swap swap sw 0 0

4、激活

swapon /media/swapfile.img

5、验证是否成功

[root@izwz956snfyrvah6yq8sa4z ~]# cat /proc/swaps
Filename                                Type            Size    Used    Priority
/media/swapfile.img                     file            1048572 0       -2

[root@izwz956snfyrvah6yq8sa4z ~]# grep 'Swap' /proc/meminfo
SwapCached:            0 kB
SwapTotal:       1048572 kB
SwapFree:        1048572 kB

你可能感兴趣的:(make 报错c++: internal compiler error: Killed (program cc1plus))