一、问题:
使用英伟达或电脑编译PCL时,报错c++: internal compile error: Killed(program cc1plus)
c++: internal compiler error: Killed (program cc1plus)
Please submit a full bug report,
with preprocessed source if appropriate.
See for instructions.
sample_consensus/CMakeFiles/pcl_sample_consensus.dir/build.make:158: recipe for target 'sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o' failed
make[2]: *** [sample_consensus/CMakeFiles/pcl_sample_consensus.dir/src/sac_model_cone.cpp.o] Error 4
make[2]: *** Waiting for unfinished jobs.
二、原因:
编译PCL内存不足导致,英伟达nano主板(jetson nano) 内存只有4G,swap默认2GB,编译PCL时内存不足导致报错;
三、解决方案:
增加swap临时分区,之前是内存4G+2G swap,再创建2G swap
查看交换空间:
free -m
备注:另外建议编译采用make -j2或make,make -j4容易导致内存不
步骤:
sudo dd if=/dev/zero of=/root/swapfile bs=2M count=1024
2、将swapfile格式化为交换分区文件
sudo mkswap /root/swapfile
3、启用swapfile
sudo swapon /root/swapfile
4、关闭交换空间
sudo swapoff /root/swapfile
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)