0


ubuntu18.04用docker复现RDS-SLAM编译部分

记录一下RDS-SLAM的复现过程和当中遇到的一些问题

在git上直接下载完RDS-SLAM之后按照README的步骤在第一步sudo docker-compose build就遇到很多的问题。问题如下

1、报错记录【WARNING: apt does not have a stable CLI interface. Use with caution in scripts.】

直接运行RDS-SLAM的dockerfile

遇到报错:

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

解决方法:

RUN apt update
不要在脚本中使用apt命令,如果在脚本中使用apt命令,有可能会得到"WARNING: apt does not have a stable CLI interface. Use with caution in scripts." 提示。使用apt-get命令进行替换apt,问题解决!

RUN apt-get update

2、报错记录【W: GPG error: https://developer.do....E: The repository ‘https://develope】

遇到报错:

解决方法:

在dockerfile中把其中的代码修改一下,添加公钥,在apt-get update前面添加:

apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/3bf863cc.pub \

虽然说这里面的是ubuntu1604,但是我自己试了一下没有报错,应该是没关系的。 问题解决!

3、报错记录【ERROR: This script does not work on Python 3.6 The minimum supported Python version is 3.7. Please use https://bootstrap.pypa.io/pip/3.6/get-pip.py instead.】

问题描述:

参考:关于Docker 报错 问题 ERROR:This script does not work on python 3.5 The minimum supported Python version_觉子的博客-CSDN博客

解决方案:

将Dockerfile中的提示 “https://bootstrap.pypa.io/get-pip.py”改为建议的“https://bootstrap.pypa.io/pip/3.6/get-pip.py ”即可,这里看报错提示根据提示来修改。
这里需要说明,不能在编译环境中(Linux)进行更改,这样还会报同样的错误,因为只修改了主机环境的pip,跟Docker环境是两码事,所以一定要在Dockerfile中修改!

问题解决!

4、报错记录【ERROR: Could not find a version that satisfies the requirement comm>=0.1.3 (from ipywidgets; extra == "all"->IPython[all]->-r /root/requirements.txt (line 14)) (from versions: 0.0.1)】

继续运行时报错

解决方法:

我觉得是pip2版本的问题,就在dockerfile中把报错中的pip2改成pip3,修改后成功!

5、报错记录【failed to solve: process "/bin/sh -c /bin/bash -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' && apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 && apt-get update && apt install -f && apt-get install -y ros-melodic-desktop-full" did not complete successfully: exit code: 100】

在这里我们是配置ROS的时候有一个网fetch不到

解决方案:

挂VPN再run一下就能够解决了。但是运行的时间巨长!

6、报错记录【ERROR: Rosdep experienced an error: ('The read operation timed out',) Please go to the rosdep page [1] and file a bug report with the stack trace below.】

    之前在ubuntu下安装ros的时候这一步就会卡住,所以在发现这个错误的时候也并不奇怪,看了一下dockerfile 他写的就是直接运行的,而且后面直接rosdep update 那后面也会报错的。说实话我真不知道作者他是怎么直接运行成功的。。。。。。继续持续记录报错。。。

解决方案:

    在dockerfile中找到RUN rosdep init然后把他换成
RUN apt-get install python-rosdep \
    && rosdep init

在运行一下就好了,问题解决!

7、报错记录【ERROR [rdsslam 12/28] RUN rosdep update 】

不得不说有的时候前面解决过得问题过了两个月我是真的不记得了,然后又得重新去找解决办法,所以说自己记录一下真的很重要!

解决方案:

参考博客:

ROS rosdep update更新失败(简单解决)_rosdep update reading in sources list data from /e-CSDN博客

在dockerfile中找到RUN rosdep update那一行(就是上面一个报错的下一行)然后将其修改为

RUN pip3 install rosdepc \
    && rosdepc update

再去build一下就通了,问题解决!

8、报错记录【 ERROR [rdsslam 21/29] RUN wget -c http://mi.eng.cam.ac.uk/~agk34/resources/SegNet/segnet_pascal.caffemodel

在这里报错了,我上了一下这个网址好像是之前的网址现在已经没有了。

解决方案:

因为这个是编译所以我打算把该指令直接删除然后再编译好创建新的容器后在容器当中去加入这个模型,但是需要注意的是我们要记住这个容器中的路径。 这个在我们的dockerfile中有写

9、有时会由于网络问题,在git clone的时候可能会有一些报错

多build几次就好了

到此就已经build好了,终于进入下一步。

标签: linux

本文转载自: https://blog.csdn.net/m0_57448978/article/details/133933896
版权归原作者 RickeyOvO 所有, 如有侵权,请联系我们删除。

“ubuntu18.04用docker复现RDS-SLAM编译部分”的评论:

还没有评论