1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > 解决sudo rosdep init 报错的问题

解决sudo rosdep init 报错的问题

时间:2021-12-12 10:27:03

相关推荐

解决sudo rosdep init 报错的问题

按照/cn/melodic/Installation/Ubuntu中步骤安装,进行到sudo rosdep init提示找不到命令

在网上找了下解决办法,如:

sudo apt install python-rosdep执行之后,又提示

ERROR: cannot download default sources list from:/ros/rosdistro/master/rosdep/sources.list.d/20-default.listWebsite may be down.

接着按照/p/bdbfbac69114这上的面操作步骤来

sudo apt-get install ca-certificates

新建目录/etc/ros/rosdep/sources.list.d

新建文件sudo gedit 20-default.list

将网址中内容复制进去

# os-specific listings firstyaml /ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# genericyaml /ros/rosdistro/master/rosdep/base.yamlyaml /ros/rosdistro/master/rosdep/python.yamlyaml /ros/rosdistro/master/rosdep/ruby.yamlgbpdistro /ros/rosdistro/master/releases/fuerte.yaml fuerte# newer distributions (Groovy, Hydro, ...) must not be listed anymore, they are being fetched from the rosdistro index.yaml instead

执行rosdep update还是报错

reading in sources list data from /etc/ros/rosdep/sources.list.dERROR: unable to process source [[/ros/rosdistro/master/rosdep/osx-homebrew.yaml](/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e4pyVgDjNm3SaoaxT39lV2h1C6ZRqu3Ohsi0ZhQy1cgW5DaxsU0VVq099hJLALtyPraHkhVQYEleySdzQDlWLfuyu4YXs62n7WWp87t6F1nMhvv0JflI+P2dj2oeHoEzTI=)]:<urlopen error _ssl.c:495: The handshake operation timed out> ([/ros/rosdistro/master/rosdep/osx-homebrew.yaml](/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e4pyVgDjNm3SaoaxT39lV2h1C6ZRqu3Ohsi0ZhQy1cgW5DaxsU0VVq099hJLALtyPraHkhVQYEleySdzQDlWLfuyu4YXs62n7WWp87t6F1nMhvv0JflI+P2dj2oeHoEzTI=))Hit [/ros/rosdistro/master/rosdep/base.yaml](/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e64EpZhV/nSSfaMCRlMqNMjqsw5JFtciolkdT5HNLb22Z8xZQwNWZn8DhrNz7QOmul3vNSiiiuylvEgZ+MKQ61lxfjiJ1xO6k1T0sjgIIm+zjA8Zu4mdgY0)ERROR: error loading sources list:The read operation timed out

他的解决办法

sudo apt-get updatesudo apt-get install python-rosdep

不能解决我的问题。

接着在网络中找到这篇文章

/topic/878/%E8%A7%A3%E5%86%B3rosdep-init-error-cannot-download-default-sources-list-%E9%97%AE%E9%A2%98

说是 如果你在执行 rosdep init 过程中出现以下错误

ERROR: cannot download default sources list from:/ros/rosdistro/master/rosdep/sources.list.d/20-default.listWebsite may be down.

这是由于被墙,程序无法下载相应的文件导致的。

就按照他的方法,修改hosts文件。

把下面的内容写入/etc/hosts文件中。

192.30.253.118 185.199.110.153 github.io151.101.113.194 github.global.52.216.227.168 github-cloud.52.74.223.119 199.232.28.133 199.232.28.133 199.232.28.133 199.232.28.133 199.232.28.133 199.232.28.133 user-199.232.28.133 199.232.28.133 github.199.232.28.133 # Amazon AWS Start54.239.31.54.239.30.25console.54.239.96.90ap-northeast-1.console.54.240.226.81ap-southeast-1.console.54.240.193.125ap-southeast-2.console.54.239.54.102eu-central-1.console.177.72.244.194sa-east-1.console.176.32.114.59eu-west-1.console.54.239.31.128us-west-1.console.54.240.254.230us-west-2.console.54.239.38.102s3-console-us-standard.console.54.231.49.52.219.0.4s3-ap-northeast-54.231.242.170s3-ap-southeast-54.231.251.21s3-ap-southeast-54.231.193.37s3-eu-central-52.218.16.140s3-eu-west-52.92.72.2s3-sa-east-54.231.236.6s3-us-west-54.231.168.160s3-us-west-52.216.80.48github-cloud.54.231.40.3github-com.52.216.20.171github-production-release-asset-2e65be.52.216.228.168github-production-user-asset-6210df.

再执行rosdep update就OK了。

至于中间的操作自己新建20-default.list文件是否有必要,不清楚。一路试探下来的,没有再返回单独测试。记录这个操作,只为防止以后重新安装时再遇到这个问题。能解决问题就行,不求严谨。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。