ros 安裝問題匯總


1.教程

https://www.linuxidc.com/Linux/2019-03/157199.htm

 

2.密鑰錯誤,則:這個可以用

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654

 

3.

sudo rosdep init

  此時,卻遇到了一個問題

ERROR: cannot download default sources list from:
https://raw.github.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
Website may be down.

解法1:該問題可能是The Great Wall的原因,反正在開啟VPN之后此問題得到了解決,有時通過手機熱點也能成功,可能是網絡問題。

解法2:修改/ros/rosdep/source.list.d/20-default.list文件(githubusercontent全改為github)(這種方法還沒試過)

解法3:在/etc目錄下新建/ros/rosdep/sources.list.d/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

注:這里雖然手動新建了20-default.list,但執行sudo rosdep init依然會出現之前的錯誤,這里我們無視,繼續執行下一步。會在下一步出現問題:

4.    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]:
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml]:
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml]:
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/python.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml]:
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/ruby.yaml)
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/releases/fuerte.yaml]:
    Failed to download target platform data for gbpdistro:
    <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)>
Query rosdistro index https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml
ERROR: error loading sources list:
    <urlopen error <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)> (https://raw.githubusercontent.com/ros/rosdistro/master/index-v4.yaml)>

解決:

在/usr/lib/python2.7/dist-packages/rosdep2/sources_list.py中頂部直接插入兩行代碼取消SSL驗證

import ssl
ssl._create_default_https_context = ssl._create_unverified_context

再次rosdep update    成功升級,至此終於完成rosdep初始化,問題解決,大功告成。

轉自

https://zhuanlan.zhihu.com/p/77483614

感謝大神。另外,最好把自己的安裝環境作成系統盤,避免一次又一次的配置環境。祝好!!!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM