当前位置:网站首页>Sudo rosdep init error ROS installation problem solution
Sudo rosdep init error ROS installation problem solution
2022-07-25 14:42:00 【The world is darker than pupils】
sudo rosdep init error Problem solution
A brief description of the problem
operating system :Ubuntu18.04
ROS edition :melodic
For a long time , Due to my computer problem , Only through VMWare Software installation Ubuntu The virtual machine of the operating system ROS Relevant learning and Application , And accidentally and repeatedly found that after installing the system , Conduct ROS During installation , Follow the official installation tutorial to the command line posted below , An error prompt appears as shown in the figure below :
sudo 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.

So try to access through the browser error The website mentioned in : Browser launch ——!!!
Found that the website can't be opened , So try the following code ,ping Check this website
ping raw.githubusercontent.com
But I found that it was actually through the terminal ping The way , We can visit the above web address 
So what? error What is the content of the address returned in , So it was installed from one ROS On the computer , We visited this error The website mentioned in , You can see some information of this website page from the following figure .
So after installation ROS I read the relevant documents on my computer , Found in /etc/ros/rosdep/sources.list.d There is a name under the file directory 20-default.list file , Open the display as follows , Through comparison, we found that , The content of this document is similar to error The content of the returned website is consistent , So I guess sudo rosdep init Link to the above URL , Download related files (20-default.list) To the above Directory , And through rosdep update Access the relevant address in the file , Download related files .

Solution
Solution 0x01
If you are experiencing this problem , Then the first solution is , Replace the network , You can try using your mobile hotspot , Then continue to try the following instructions , If you succeed , Then you can finish reading this article , Of course, you are welcome to continue reading .
sudo rosdep init
rosdep update
Solution 0x02
This solution is aimed at the following two problems that cannot be accessed normally , But it can ping through , So modify hosts file , Add the following two URLs IP Address to achieve access .
sudo gedit /etc/hosts
199.232.28.133 raw.githubusercontent.com
151.101.228.133 raw.github.com
After the modification is completed , Execute at the terminal
sudo rosdep init
rosdep update
Solution 0x03
If you use a solution 0x01 Still can't solve your problem , Then you can try the following steps , The principle of this solution is based on manual completion sudo rosdep init Steps for , And then through rosdep update Complete the implementation of the whole scheme .
Step one : First open a terminal , Execute the following command to create root And switch to root user
sudo passwd // Then prompt for UNIX password , Just enter your user password
sudo su // perhaps su root Then enter the password and switch to root user
sudo mkdir -p /etc/ros/rosdep/sources.list.d
cd /etc/ros/rosdep/sources.list.d
sudo gedit 20-default.list
Step two : Copy the following into 20-default.list In file
# 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
Step three : Execute the following instructions
exit // sign out root user
rosdep update
If you succeed , Then you can finish reading this article , Of course, you are welcome to continue reading .
But maybe you will encounter the problems shown in the figure below , Find out 20-default.list The addresses in cannot be connected , At this point, you can 20-default.list Replace with the following , the raw.githubusercontent.com Replace with raw.github.com Then save the file , Execute... In the terminal
rosdep update
If you succeed , Then you can finish reading this article , Of course, you are welcome to continue reading 
# os-specific listings first
yaml https://raw.github.com/ros/rosdistro/master/rosdep/osx-homebrew.yaml osx
# generic
yaml https://raw.github.com/ros/rosdistro/master/rosdep/base.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/python.yaml
yaml https://raw.github.com/ros/rosdistro/master/rosdep/ruby.yaml
gbpdistro https://raw.github.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
Step four : Set pieces
Maybe you have finished the above steps , The message you receive in the terminal , The connection is still rejected , Or time out leads to interruption , At this point, you can execute the following instructions 
sudo su
sudo gedit /etc/hosts
stay hosts Add the following to and save , Continue after execution rosdep update
199.232.28.133 raw.githubusercontent.com
151.101.228.133 raw.github.com
Solution 0x04- The ultimate
If the above steps still cannot solve your problem , Then you can proceed to this last step .
Execute the following instructions ,
sudo rosdep init
The system prompts that it already exists 20-default.list( Solution oriented 0x02 establish ), Then delete the file below
sudo su
cd /etc/ros/rosdep/sources.list.d
sudo rm 20-default.list
exit
Open a new terminal after removing the file
sudo rosdep init
rosdep update
Virtual machine network problems
The author is using virtual machine to install ubuntu Operating system installation ros Encountered the above problems in the process , After completing the above steps, be tolerant to appear time out Error reporting of , Even mobile phone hotspots can't solve the problem , So I thought about whether it was the network configuration of virtual machines . First, open the settings of the virtual machine , We can see that the default network adapter of the virtual machine is NET Pattern : For sharing hosts IP Address ;
Step one : Switch the network adapter to bridge mode
If you directly set it to the bridge mode through the above setting panel and start the virtual machine , You will find that the virtual machine has no network . The reason is that the bridging network setting of the virtual machine is automatic by default , But this automation is not intelligent , So how to change this setting , Click Edit in the menu bar above , Choose virtual network editor 
We can't see the bridging network from the picture , Click change settings , Then the panel disappears , Then click Edit in the menu bar , Choose virtual network editor , At this point, you can see the bridging mode , And bridge the lower Automatically Change to Computer network card 
thus , The virtual machine network consists of NET Mode goes to bridge mode , At this point in the process rosdep update Can solve time out problem .
At the end
The above solution has been verified several times to be feasible , If this scheme is adopted , Solved the problem you encountered , If it's convenient , Please stamp on the message ( Leaving a message. ), It is convenient for those who find this article later to believe the authenticity and feasibility of this article . I wish you all on the road of study and scientific research , everything is going smoothly !
边栏推荐
- Application practice: Great integrator of the paddy classification model [paddlehub, finetune, prompt]
- Paddlenlp's UIE relationship extraction model [executive relationship extraction as an example]
- The main function of component procurement system, digital procurement helps component enterprises develop rapidly
- 用GaussDB(for Redis)存画像,推荐业务轻松降本60%
- awk从入门到入土(23)awk内置变量ARGC、ARGC--命令行参数传递
- 安防市场进入万亿时代,安防B2B网上商城平台精准对接深化企业发展路径
- sudo rosdep init Error ROS安装问题解决方案
- jqgrid全选取消单行点击取消事件
- 41 图片背景综合-五彩导航图
- 元器件采购系统的主要功能,数字化采购助力元器件企业飞速发展
猜你喜欢

Live classroom system 05 background management system

如何让一套代码完美适配各种屏幕?

The solution to the problem that the progress bar of ros2 installation connext RMW is stuck at 13%

元器件采购系统的主要功能,数字化采购助力元器件企业飞速发展

06、类神经网络

51单片机学习笔记(1)

39 简洁版小米侧边栏练习

阿里云技术专家邓青琳:云上跨可用区容灾和异地多活最佳实践

【MySQL系列】-索引知多少

PS making and loading GIF pictures tutorial
随机推荐
Idea regular expression replacement (idea regular search)
Paddlenlp之UIE关系抽取模型【高管关系抽取为例】
结构体大小
Under the epidemic, the biomedical industry may usher in breakthrough development
Opencv video tracking "suggestions collection"
QObject source code analysis -d pointer and Q pointer
Jqgrid select all cancel single line click cancel event
Gateway 网关报错 SERVICE_UNAVAILABLE
应用实践:Paddle分类模型大集成者[PaddleHub、Finetune、prompt]
D2. Chopping Carrots (Hard Version) (每日一题)
为什么中建、中铁都需要这本证书?究竟是什么原因?
优质数对的数目[位运算特点+抽象能力考察+分组快速统计]
阿里云安装MYSQL5.7
The main function of component procurement system, digital procurement helps component enterprises develop rapidly
Development of uni app offline ID card identification plug-in based on paddleocr
Syntax summary of easygui
H5页面input输入框弹起数字键盘,需要支持小数点
Why do China Construction and China Railway need this certificate? What is the reason?
The security market has entered a trillion era, and the security B2B online mall platform has been accurately connected to deepen the enterprise development path
Doris learning notes integration with other systems