Three tips for ubuntu apt-get && the pits of ROS installation

1. "apt-get -f install" errors and solutions

A certain deb package is installed through dpkg but the dependency problem is not solved. When apt-get is used again, this error will occur.
Solution: sudo dpkg -r problematic software

Second, the browser installation

For example sudo apt-get install ros-kinetic-desktop-fullcommand line installation is slow, the error rate
can be input in the browser apt:ros-kinetic-desktop-full?refresh=yes, the visual installation

3. Switch to Tsinghua Yuan

The system comes with /etc/apt/sources.listfiles to be backed up, replace the contents of the file as the following:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
Four, ROS installation problems

When rosdep update appears:

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.

The reason is: raw.githubusercontent.comby the wall.
Solution: curve to save the country

# 通过站长工具解析  raw.githubusercontent.com,挨个尝试找到可以用的 ip
# 修改 hosts:
sudo gedit /etc/hosts
# 添加如下行:
151.101.84.133  raw.githubusercontent.com
# 保存后执行:
rosdep update

Guess you like

Origin blog.csdn.net/ManWZD/article/details/105720571