Ubuntu18.04下编译ORB_SLAM3遇到的问题

参考博文:https://blog.csdn.net/weixin_42203839/article/details/107728106 ORB_SLAM3的编译及运行【完整教程】

1.E: Unable to correct problems, you have held broken packages 类似下图

Ubuntu18.04下编译ORB_SLAM3遇到的问题_第1张图片

推荐解决方案:换阿里云镜像源(具体换源方法 百度很多)

其它参考方案:

https://www.cnblogs.com/schips/p/12470790.html        更换源

https://www.cnblogs.com/aaron-agu/p/8862624.html   使用aptitude(貌似不太安全)

https://blog.csdn.net/cnmilan/article/details/38270831 先删除,后安装(太繁琐)

 

2.fatal error: boost/serialization/serialization.hpp: No such file or directory

解决方案:sudo apt install libboost-filesystem-dev

 

3.c++: internal compiler error: Killed (program cc1plus)

推荐解决方案:使用make –j2 或者 make -jn 或者 make(而不是make -j) (建议将n设为cpu逻辑数量)

查看linux 版本: cat /proc/version
cpu逻辑数量:   cat /proc/cpuinfo |grep "processor"|sort -u|wc -l
https://blog.csdn.net/dongfang1984/article/details/53841621 查询cpu信息

参考方案:https://blog.csdn.net/u011897411/article/details/89742008

本渣渣电脑 运行./build.sh  编译24小时未果 果断放弃 查看其内部命令为 make –j 故改之

 

4.dd: failed to open '/swapfile': Text file busy

解决方案:sudo swapoff –a(watch free –m 监控内存变化)

 

5.fatal error: openssl/md5.h: No such file or directory

解决方案:sudo apt install libssl-dev

 

6.Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support

已经安装好了相应的库 重新编译之后还是这个错误 略坑

Ubuntu18.04下编译ORB_SLAM3遇到的问题_第2张图片

解决方案:需卸载opencv重新安装

https://blog.csdn.net/amateur_/article/details/79854465  具体卸载方法

https://blog.csdn.net/loveaborn/article/details/7647734   问题参考

阿里镜像源

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

你可能感兴趣的:(linux,SLAM,ORB_SLAM3,ubuntu18,问题,编译)