先复制一份源文件
再更换源地址。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo gedit /etc/apt/sources.list
国内常用的地址源如下:
清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
阿里源:
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
中科大源:
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse
更换之后,执行
sudo apt update
使用中科大ros源
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
如果执行有问题,则:
sudo sh -c 'echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -
如果不行,则:
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116
然后再更新apt源列表
sudo apt update
W: GPG 错误:http://mirrors.ustc.edu.cn/ros/ubuntu xenial InRelease: 由于没有公钥,无法验证下列签名: NO_PUBKEY F42ED6FBAB17C654
缺少公钥,也可能时公钥过期
解决方法:重新添加公钥:
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F42ED6FBAB17C654
W: 仓库 “http://ppa.launchpad.net/tualatrix/ppa/ubuntu xenial Release” 没有 Release 文件。
N: 无法认证来自该源的数据,所以使用它会带来潜在风险。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-amd64/Packages 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-i386/Packages 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/binary-all/Packages 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-zh_CN 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-zh 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/i18n/Translation-en 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/dep11/Components-amd64.yml 404 Not Found [IP: 91.189.95.83 80]
W: 无法下载 http://ppa.launchpad.net/tualatrix/ppa/ubuntu/dists/xenial/main/dep11/icons-64x64.tar 404 Not Fo
首先说明此问题与ROS安装无关。
原因可能是PPA源中此用户删除了这些文件,但又添加了此源。
解决方法:打开/etc/apt/sources.list.d文件夹,删除相关源文件。
sudo apt-get install ros-kinetic-desktop-full
W:Possible missing firmware /lib/firmware/i915/kbl_guc_ver9_14.bin for module i915
因为在Linux下没有安装因特尔的图形固件。而这个固件这两年因特尔已经发布了。所以我们只需要去下载就好了。
解决方法:首先去到这个网址,你会看到很多固件的选择项,你选择自己缺的那个点击进去
固件下载地址
选择自己缺少的估固件后,点plain下载
下载好之后,将固件复制到相应的文件夹下:/lib/firmware/i915
sudo rosdep init
sudo rosdep update
ERROR:error loading sources list:(The read operation time out)
操作超时,wifi网络的问题。
解决方法:更换成手机热点后解决
ros urlopen error [Errmo 111]Connection refused
访问不被允许,或被拒绝
解决方法:更换网络再试试。。
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.
解决方法
可能是因为raw.githubusercontent.com网站被墙了。
解决办法是修改hosts文件,添加这个网站的ip地址
#打开hosts文件
sudo gedit /etc/hosts
#在文件末尾添加
151.101.84.133 raw.githubusercontent.com
#保存后退出再尝试
echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc
source ~/.bashrc