国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

如何解決ROS安裝過程中rosdep init和rosdep update報錯誤的問題

這篇具有很好參考價值的文章主要介紹了如何解決ROS安裝過程中rosdep init和rosdep update報錯誤的問題。希望對大家有所幫助。如果存在錯誤或未考慮完全的地方,請大家不吝賜教,您也可以點(diǎn)擊"舉報違法"按鈕提交疑問。

幾年沒手工安裝ros了,一般拉個安裝好了cuda和ros等工具軟件的docker image直接使用,以前安裝過程中很順利不會有什么報錯,最近按照melodic/Installation/Ubuntu - ROS Wiki這里的步驟安裝melodic

sudo apt install lsb-core
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
sudo apt update
sudo apt install ros-melodic-desktop-full
echo "source /opt/ros/melodic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python-rosdep python-rosinstall python-rosinstall-generator python-wstool build-essential
sudo rosdep init
rosdep update

或noetic/Installation/Ubuntu - ROS Wiki

sudo apt install lsb-core
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt install curl
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -
sudo apt update
sudo apt install ros-noetic-desktop-full
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential
sudo rosdep init
rosdep update

這里的步驟安裝noetic,執(zhí)行到curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | apt-key add -時

死掉,rosdep init和rosdep update時總是下面的報錯:

ERROR: cannot download default sources list from:
https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/sources.list.d/20-default.list
ERROR: unable to process source [https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml]:
?? ?<urlopen error [Errno 111] Connection refused> (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 [Errno 111] Connection refused> (https://raw.githubusercontent.com/ros/rosdistro/master/rosdep/base.yaml)

...

根本原因是執(zhí)行這些步驟時需要連到raw.githubusercontent.com這個已經(jīng)被墻掉的網(wǎng)站下載一些文件,網(wǎng)上推薦的解決辦法一般是去修改/etc/resolve.conf或者/etc/hosts增加谷歌的服務(wù)器ip地址或githubusercontent.com的ip地址,點(diǎn)擊這個網(wǎng)址raw.githubusercontent.com獲取githubusercontent.com的ip地址:

如何解決ROS安裝過程中rosdep init和rosdep update報錯誤的問題,ROS,ros,rosdep

?把這些地址加入到/etc/hosts里發(fā)現(xiàn),每個地址訪問一次后就被阻住,要過好一陣才能再訪問,所以安裝不能順利進(jìn)行下去。

被逼著去翻看了一下ros源碼和網(wǎng)上信息,其實(shí)解決比較簡單,對于ros.asc(我下載后上傳到了這里)下載不了,可以從國內(nèi)鏡像網(wǎng)站上下載這個文件到本地,然后執(zhí)行:

sudo apt-key add ros.asc

對于rosdep init和rosdep update報錯思路就是把從githubusercontent.com上下載文件改成從國內(nèi)的鏡像網(wǎng)站下載即可,

執(zhí)行下面的命令即完成了rosdep init 和rosdep update:

sudo apt-get install wget
sudo mkdir -p /etc/ros/rosdep/sources.list.d
wget https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list -O /etc/ros/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml && rosdep update

后來看到網(wǎng)上有人單獨(dú)做了個工具rosdepc來替代rosdep,可以執(zhí)行下面的命令安裝:


sudo apt-get install python3-pip 
sudo pip install rosdepc

然后執(zhí)行rosdepc init和rosdepc update

但是因?yàn)镺S環(huán)境支持的字符集的不同,執(zhí)行過程中可能會報下面的錯誤:

Traceback (most recent call last):
? File "/usr/local/bin/rosdepc", line 8, in <module>
? ? sys.exit(main())
? File "/usr/local/lib/python3.6/dist-packages/rosdepc/rosdepc.py", line 52, in main
? ? print(hints['welcome'])
UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-7: ordinal not in range(128)

Traceback (most recent call last):
? File "/usr/local/bin/rosdepc", line 8, in <module>
? ? sys.exit(main())
? File "/usr/local/lib/python3.6/dist-packages/rosdepc/rosdepc.py", line 52, in main
? ? print(hints['welcome'])
UnicodeEncodeError: 'ascii' codec can't encode character '\u201c' in position 145: ordinal not in range(128)

原因是這個rosdepc工具的/usr/local/lib/python3.6/dist-packages/rosdepc/rosdepc.py這個文件里寫了大量的用于提示的中文字符以及@等ascii碼字符集不支持的字符,把里面的包含的中文和特殊格式符都刪掉即可,這些信息其實(shí)沒啥用,刪干凈了再執(zhí)行rosdepc init即可,可以看到rosdepc.py這個文件里的核心語句其實(shí)就是我上面寫的那幾句命令,所以完全不用安裝這個工具包,直接執(zhí)行這兩句命令更簡捷:文章來源地址http://www.zghlxwxcb.cn/news/detail-571926.html

wget https://mirrors.tuna.tsinghua.edu.cn/github-raw/ros/rosdistro/master/rosdep/sources.list.d/20-default.list -O /etc/ros/rosdep/sources.list.d/20-default.list
export ROSDISTRO_INDEX_URL=https://mirrors.tuna.tsinghua.edu.cn/rosdistro/index-v4.yaml && rosdep update

到了這里,關(guān)于如何解決ROS安裝過程中rosdep init和rosdep update報錯誤的問題的文章就介紹完了。如果您還想了解更多內(nèi)容,請?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場。本站僅提供信息存儲空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請點(diǎn)擊違法舉報進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • git submodule update --init 失敗解決辦法

    git submodule update --init 失敗解決辦法

    我們在github上尋找開源項(xiàng)目的源碼,clone下來研究的時候,由于項(xiàng)目需要多個開源項(xiàng)目的支持,所有還需要二次clone子工程的源碼支持,比如最近在使用: grpc 在clone子模塊的時候會出現(xiàn)失敗或無法訪問的情況,其原因眾所周知無非就是有些東西需要科學(xué)上網(wǎng) 找到項(xiàng)目的.gitmodul

    2024年02月16日
    瀏覽(21)
  • ARM板上 rosdep update 遇到的問題

    RROR: Rosdep experienced an error: Unable to handle \\\'index\\\' format version \\\'3\\\', please update rosdistro Please go to the rosdep page [1] and file a bug report with the stack trace below. [1] : http://www.ros.org/wiki/rosdep rosdep version: 0.10.25 Traceback (most recent call last): File \\\"/usr/lib/pymodules/python2.7/rosdep2/main.py\\\", line 121, in rosdep_main

    2024年02月14日
    瀏覽(15)
  • git submodule update --init命令速度太慢的解決方法

    git submodule update --init命令速度太慢的解決方法

    我們在 clone 某個代碼庫時,代碼庫可能使用了其他代碼庫的資源,開發(fā)者為避免重復(fù)開發(fā),將使用到的其他庫以鏈接的方式作為公共資源保存,我們需要在 clone 之后執(zhí)行以下命令才能得到完整的依賴: 但是在執(zhí)行 git submodule update --init 命令時,由于沒有提示條,且看不到實(shí)

    2024年02月12日
    瀏覽(28)
  • 【Android】adb安裝錯誤:INSTALL_FAILED_UPDATE_INCOMPATIBLE可嘗試的解決方法

    1、問題描述 最近打包在測試機(jī)上安裝應(yīng)用遇到了這樣的錯誤: 網(wǎng)上的說法是因?yàn)榘w簽名有修改過,舊包雖然卸載了,但還有信息殘留在手機(jī)里。我回想一下好像確實(shí)干過更換包體簽名這個事。 2、解決方法 在出現(xiàn)安裝錯誤的測試機(jī)上通過adb命令卸載包名對應(yīng)包體,即便你

    2024年02月11日
    瀏覽(25)
  • 虛擬機(jī)Ubuntu18.04安裝對應(yīng)ROS版本詳細(xì)教程!(含錯誤提示解決)

    虛擬機(jī)Ubuntu18.04安裝對應(yīng)ROS版本詳細(xì)教程!(含錯誤提示解決)

    參考鏈接: Ubuntu18.04安裝Ros(最新最詳細(xì)親測)_向日葵騎士Faraday的博客-CSDN博客 1.4 ROS的安裝與配置_嗶哩嗶哩_bilibili ROS官網(wǎng):http://wiki.ros.org/melodic/Installation/Ubuntu 安裝ROS時會自動安裝舊版的Cmake3.10.2。所以在安裝Ros之前,需要先檢查此先是否有安裝Cmake。如果之前已經(jīng)安裝新版

    2024年02月02日
    瀏覽(70)
  • 【carla】ubuntu20.04 編譯carla-ros-bridge 安裝過程、報錯及其解決方法

    下載后進(jìn)行catkin_make會報錯3個錯誤 Create a catkin workspace: Clone the ROS Bridge repository and submodules: Set up the ROS environment according to the ROS version you have installed: Install the required ros-dependencies: 安裝rosdepc,然后運(yùn)行: 7.創(chuàng)建虛擬環(huán)境 8.安裝pip依賴 方法1:在conda環(huán)境中安裝empy: conda instal

    2024年02月11日
    瀏覽(31)
  • 解決Ubuntu軟件更新命令:sudo apt-get update的“N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源”錯誤并安裝gcc

    解決Ubuntu軟件更新命令:sudo apt-get update的“N: 無法安全地用該源進(jìn)行更新,所以默認(rèn)禁用該源”錯誤并安裝gcc

    使用快捷鍵:Ctrl+Alt+T打開終端進(jìn)入命令行 使用命令確認(rèn)Ubuntu版本: 鏡像源網(wǎng)址: https://mirror.tuna.tsinghua.edu.cn/help/ubuntu/ 打開之后如圖所示,因?yàn)闆]有找到完全對應(yīng)的Ubuntu版本號,嘗試選擇了Ubuntu版本:22.10,親測可行 因?yàn)槌跏嫉腢buntu不自帶vim工具,所以這里用vi進(jìn)行編輯文件

    2024年01月19日
    瀏覽(20)
  • Ubuntu sudo apt update 過程中遇到的報錯解決

    Ubuntu sudo apt update 過程中遇到的報錯解決

    E: 倉庫 “https://mirrors.aliyun.com/docker-ce/linux/ubuntu kylin Release” 沒有 Release 文件。 sudo apt update:倉庫 “http://mirrors.aliyun.com/docker-ce/linux/debian ulyana Release” 沒有 Release 文件 Linux更換國內(nèi)源–解決終端下載速度慢的問題 在使用 sudo apt update 更新源時,發(fā)現(xiàn)報了一大堆錯。例如 起初我

    2024年02月02日
    瀏覽(39)
  • 解決 adb install 錯誤INSTALL_FAILED_UPDATE_INCOMPATIBLE

    解決 adb install 錯誤INSTALL_FAILED_UPDATE_INCOMPATIBLE

    ?? ? ? ? 最近給游戲出包,平臺要求 v1 簽名吧,AS 打包后,adb 執(zhí)行安裝到手機(jī),我用的設(shè)備是google pixel6 , android 系統(tǒng) 13,?提示如下: 字面意思理解就是安裝包沒有 V2 或更高等級的簽名。我又嘗試在三星平板android系統(tǒng) 8 上安裝,咦,安裝成功了。那可能就是跟設(shè)備 Api 版

    2024年02月12日
    瀏覽(40)
  • ROS下配置OpenCV+一些錯誤解決(段錯誤,核心已轉(zhuǎn)儲)

    ROS下配置OpenCV+一些錯誤解決(段錯誤,核心已轉(zhuǎn)儲)

    進(jìn)入opencv文件夾,創(chuàng)建編譯文件夾 選擇OpenCV 源碼所在路徑 和 編譯文件所在路徑 ,單擊【Configure】按鈕,默認(rèn)選項(xiàng)即可,單擊【Finish】后,在cmake界面會出現(xiàn)很多變量。 BUILD_opencv_world和OPENCV_ENABLE_NONFREE兩個變量,在其后面的方框上打勾。 OPENCV_EXTRA_MODULES_PATH變量,選擇路徑為

    2024年03月17日
    瀏覽(29)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包