Ubuntu16.04安装ceres1.14.0报错:c++: internal compiler error: 已杀死 (program cc1plus)

系统:Ubuntu16.04

在安装ceres1.14.0的过程中

当走到:

make -j3

 出现报错:

c++: internal compiler error: 已杀死 (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
examples/CMakeFiles/nist.dir/build.make:62: recipe for target 'examples/CMakeFiles/nist.dir/nist.cc.o' failed
make[2]: *** [examples/CMakeFiles/nist.dir/nist.cc.o] Error 4
CMakeFiles/Makefile2:5885: recipe for target 'examples/CMakeFiles/nist.dir/all' failed
make[1]: *** [examples/CMakeFiles/nist.dir/all] Error 2
make[1]: *** 正在等待未完成的任务....
[ 64%] Linking CXX executable ../../bin/block_random_access_diagonal_matrix_test
[ 64%] Built target block_random_access_diagonal_matrix_test
[ 64%] Linking CXX executable ../../bin/cost_function_to_functor_test
[ 64%] Built target cost_function_to_functor_test
Makefile:138: recipe for target 'all' failed

原因:内存不足

解决方法:

sudo dd if=/dev/zero of=/swapfile bs=64M count=16
#count的大小就是增加的swap空间的大小,64M是块大小,所以空间大小是bs*count=1024MB

sudo mkswap /swapfile
#把刚才空间格式化成swap格式

sudo swapon /swapfile
#使用刚才创建的swap空间

make -j3
#重新make

sudo swapoff /swapfile

sudo rm /swapfile
#释放临时加的内存空间

参考文章:https://www.cnblogs.com/yangjiquan/p/11368262.html

 

  • 1
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值