Tag Archives: Ubuntu18.04 Install ROS Error

Ubuntu18.04 Install ROS Error: rosdep update [How to Solve]

In the installation of ros for rosdep update often reported errors, there is a way to 100% success, solved by modifying the download source files, a total of 5 files, here is a record.

1) open sources_list.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/sources_list.py

1.1 add a line between lines 310 and 311

url = 'https://ghproxy.com/'+url

After adding, it is shown in the following figure.

1.2 Modify line 72 and add after the equal sign

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

2) open gbpdistro_support.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/gbpdistro_support.py

2.1 Modify line 36 to add

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

2.2 modify 204 lines and add the same contents as 2.1

After modification, see the following figure.

After modification, save and exit.

3) open rep3.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdep2/rep3.py

Modify line 39 and add the same content as 2.1, namely

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

(4) open __init__.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/__init__.py

Line 68, add the same as 2.1, namely

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

5 open github.py

sudo gedit /usr/lib/python2.7/dist-packages/rosdistro/manifest_provider/github.py

Amend line 68 to add

'https://ghproxy.com/' + 

After modification, it is shown in the following figure.

After modification, save and exit.

After all the modifications are saved, execute rosdep update. After the update is completed, see the following figure: