ROS安装问题记录
安装过程 主要参考官网
http://wiki.ros.org/cn/kinetic/Installation/Ubuntu
但是在安装过程中还是会出现一些问题,现在将这些问题进行记录:
(现在这些问题已经不是问题了,因为有了一键安装ros https://www.fishros.com/#/fish_home)
问题一:公钥添加失败
Executing: /tmp/tmp.r9uVIhd1Ts/gpg.1.sh --keyserver
hkp://keyserver.ubuntu.com:80
--recv-key
C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
gpg: 下载密钥‘AB17C654’,从 hkp 服务器 keyserver.ubuntu.com
?: keyserver.ubuntu.com: Host not found
gpgkeys: HTTP fetch error 7: couldn't connect: Connection timed out
gpg: 找不到有效的 OpenPGP 数据。
gpg: 合计被处理的数量:0
gpg: 公钥服务器通讯错误:keyserver unreachable
gpg: 公钥服务器通讯错误:找不到公钥
gpg: 从公钥服务器接收失败:找不到公钥
解决方案:1、按照官网上的教程,将
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
中的公钥服务器更换为
hkp://pgp.mit.edu:80
2、更换手机热点进行再次尝试
总结:公钥添加失败问题比较好解决,就是网络的问题,尝试几次就能成功。
问题2 初始化rosdep失败
sudo rosdep init 失败
在网上搜索 sudo rosdep init 查到相关解决方案,选择其中比较靠谱的方法进行了尝试:
1、https://blog.csdn.net/JanKin_BY/article/details/105509383
按照博文中步骤,直接写入相关文件,但是并没有成功,进行 rosdep update 时仍然报错:
ERROR: no sources directory exists on the system meaning rosdep has not yet been initialized.
Please initialize your rosdep with
sudo rosdep init
感觉应该是自己在哪里操作有问题,但是对于一个小白,上述操作中的纰漏不是我能看出来的,所以继续在网上查找其他的解决方案。
2、https://blog.csdn.net/HUXU666/article/details/105770734
博文直接修改hosts文件,能够成功访问
https://raw.githubusercontent.com
关于hosts文件,以及方法进行深究的话请自行上网搜索。
按照博文操作,成功。
Wrote /etc/ros/rosdep/sources.list.d/20-default.list
Recommended: please run
rosdep update
接下来连上热点,进行 rosdep update ,同样成功。(往常在这里会出现问题的,但是这一次没有出现,感觉应该是由于修改hosts文件的原因)
总之,经过上述的一波操作,ros安装过程中比较容易出现问题的地方都已经跨过去了。
参考资料:
http://wiki.ros.org/cn/kinetic/Installation/Ubuntu
https://blog.csdn.net/JanKin_BY/article/details/105509383
https://blog.csdn.net/HUXU666/article/details/105770734