解决sudo rosdep init 报错的问题
按照https://wiki.ros.org/cn/melodic/Installation/Ubuntu?中步驟安裝,進行到sudo rosdep init?提示找不到命令
在網上找了下解決辦法,如:
sudo apt install python-rosdep 執行之后,又提示 ERROR: cannot download default sources list from: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.接著按照https://www.jianshu.com/p/bdbfbac69114?這上的面操作步驟?來?
sudo apt-get install ca-certificates
新建目錄?/etc/ros/rosdep/sources.list.d
新建文件?sudo gedit 20-default.list
?
將網址中內容復制進去
# os-specific listings first yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx# generic yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml yaml https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml gbpdistro https://raw.githubusercontent.com/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.d ERROR: unable to process source [[https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml](http://jump.bdimg.com/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e4pyVgDjNm3SaoaxT39lV2h1C6ZRqu3Ohsi0ZhQy1cgW5DaxsU0VVq099hJLALtyPraHkhVQYEleySdzQDlWLfuyu4YXs62n7WWp87t6F1nMhvv0JflI+P2dj2oeHoEzTI=)]: <urlopen error _ssl.c:495: The handshake operation timed out> ([https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml](http://jump.bdimg.com/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e4pyVgDjNm3SaoaxT39lV2h1C6ZRqu3Ohsi0ZhQy1cgW5DaxsU0VVq099hJLALtyPraHkhVQYEleySdzQDlWLfuyu4YXs62n7WWp87t6F1nMhvv0JflI+P2dj2oeHoEzTI=)) Hit [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml](http://jump.bdimg.com/safecheck/index?url=rN3wPs8te/pX/RXZrrwmgz1HhLKFfuYdBR6elVnGSRMPTZwDs+V1Iw2DN2GIDg0c0lXFaWYCi6F5eugIuTik7Xf24HznH1heOw2gAEfI/e64EpZhV/nSSfaMCRlMqNMjqsw5JFtciolkdT5HNLb22Z8xZQwNWZn8DhrNz7QOmul3vNSiiiuylvEgZ+MKQ61lxfjiJ1xO6k1T0sjgIIm+zjA8Zu4mdgY0) ERROR: error loading sources list: The read operation timed out他的解決辦法?
sudo apt-get update sudo apt-get install python-rosdep不能解決我的問題。
?
接著在網絡中找到這篇文章
http://community.bwbot.org/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: https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list Website may be down.這是由于raw.githubusercontent.com被墻,程序無法下載相應的文件導致的。
就按照他的方法,修改hosts文件。
把下面的內容寫入/etc/hosts文件中。
192.30.253.118 gist.github.com 185.199.110.153 github.io151.101.113.194 github.global.ssl.fastly.net 52.216.227.168 github-cloud.s3.amazonaws.com 52.74.223.119 github.com199.232.28.133 avatars1.githubusercontent.com 199.232.28.133 avatars2.githubusercontent.com 199.232.28.133 avatars0.githubusercontent.com 199.232.28.133 avatars3.githubusercontent.com 199.232.28.133 raw.githubusercontent.com 199.232.28.133 user-images.githubusercontent.com 199.232.28.133 avatars.githubusercontent.com 199.232.28.133 github.map.fastly.net 199.232.28.133 avatars7.githubusercontent.com# Amazon AWS Start 54.239.31.69 aws.amazon.com 54.239.30.25 console.aws.amazon.com 54.239.96.90 ap-northeast-1.console.aws.amazon.com 54.240.226.81 ap-southeast-1.console.aws.amazon.com 54.240.193.125 ap-southeast-2.console.aws.amazon.com 54.239.54.102 eu-central-1.console.aws.amazon.com 177.72.244.194 sa-east-1.console.aws.amazon.com 176.32.114.59 eu-west-1.console.aws.amazon.com 54.239.31.128 us-west-1.console.aws.amazon.com 54.240.254.230 us-west-2.console.aws.amazon.com 54.239.38.102 s3-console-us-standard.console.aws.amazon.com 54.231.49.3 s3.amazonaws.com 52.219.0.4 s3-ap-northeast-1.amazonaws.com 54.231.242.170 s3-ap-southeast-1.amazonaws.com 54.231.251.21 s3-ap-southeast-2.amazonaws.com 54.231.193.37 s3-eu-central-1.amazonaws.com 52.218.16.140 s3-eu-west-1.amazonaws.com 52.92.72.2 s3-sa-east-1.amazonaws.com 54.231.236.6 s3-us-west-1.amazonaws.com 54.231.168.160 s3-us-west-2.amazonaws.com 52.216.80.48 github-cloud.s3.amazonaws.com 54.231.40.3 github-com.s3.amazonaws.com 52.216.20.171 github-production-release-asset-2e65be.s3.amazonaws.com 52.216.228.168 github-production-user-asset-6210df.s3.amazonaws.com再執行rosdep update?就OK了。
?
至于中間的操作?自己新建20-default.list文件?是否有必要,不清楚。一路試探下來的,沒有再返回單獨測試。?記錄這個操作,只為防止以后重新安裝時再遇到這個問題。能解決問題就行,不求嚴謹。
?
?
?
?
?
?
?
?
?
?
?
?
?
總結
以上是生活随笔為你收集整理的解决sudo rosdep init 报错的问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 南方科技大学招计算机博后,南方科技大学招
- 下一篇: 极客领航 C/C++|MCU|软件|物联