# ORB-SLAM3环境配置 > [ORB-SLAM3配置安装及运行---Ubuntu20.04(2021年)_1900_的博客-CSDN博客](https://blog.csdn.net/holly_Z_P_F/article/details/118031317) > > [GitHub - electech6/ORB_SLAM3_detailed_comments: Detailed comments for ORB-SLAM3](https://github.com/electech6/ORB_SLAM3_detailed_comments/blob/master/euroc_examples.sh) ## 一、Linux环境下常见问题解决方案 ### 1.1 error: ‘slots_reference’ was not declared in this scope **解决方法:** [https://blog.csdn.net/BigHandsome2020/article/details/123458612](https://blog.csdn.net/BigHandsome2020/article/details/123458612) **不是pangolin的问题!!!** **sed -i 's/++11/++14/g' CMakeLists.txt** **问题2: realsense2** ![Untitled](ORB-SLAM3-Image/Untitled.png) **解决方法:** [https://blog.csdn.net/weixin_43901418/article/details/121475001](https://blog.csdn.net/weixin_43901418/article/details/121475001) ```shell sudo apt-key adv --keyserver [keyserver.ubuntu.com](http://keyserver.ubuntu.com/) --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE sudo add-apt-repository "deb [https://librealsense.intel.com/Debian/apt-repo](https://librealsense.intel.com/Debian/apt-repo) $(lsb_release -cs) main" -u sudo apt-get install librealsense2-dkms sudo apt-get install librealsense2-utils sudo apt-get install librealsense2-dev ``` **问题3:在运行build.sh 时最后一步make -j4 构建panglin失败** ```shell cd Pangolin mkdir build cd build cmake .. cmake --build . ``` ​ [https://github.com/raulmur/ORB_SLAM2/issues/22](https://github.com/raulmur/ORB_SLAM2/issues/22) ​ 需要重新安装panglin,版本如果比较新,则需要切换到C++14 ### 1.4 没有可视化界面只有轨迹结果 ​ Monocular程序运行Euroc数据集或者其他官方数据集的时候,运行结果**只有轨迹结果,但没有可视化界面**。 ```shell ./Examples/Monocular/mono_euroc ./Vocabulary/ORBvoc.txt ./Examples/Monocular/EuRoC.yaml ``` ​ 这是因为原始灰度图像的输出是需要通过代码设置开启的,mono_euroc.cc修改: ```c++ // 这里的第三个参数为bool类型,用于控制是否显示摄像头的灰度图像 ORB_SLAM3::System SLAM(argv[1], argv[2], ORB_SLAM3::System::MONOCULAR, false); // 如果需要显示摄像头的内容,设置为true即可 ORB_SLAM3::System SLAM(argv[1], argv[2], ORB_SLAM3::System::MONOCULAR, true); ``` ### 1.5 c++: fatal error: Killed signal terminated program cc1plus ​ 内存爆了,用 make -j 不要给太多任务