我的linux版本是16.04,安装的是kinetic
1. E: Some index files failed to download. They have been ignored, or old ones used instead. 或者 Error IP......一般都是源配置有问题
sudo sh -c '. /etc/lsb-release && echo "deb https://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
将下载ros的源修改成为中科大的镜像地址,并把packages源地址修改成为中科大地址,实测安装ros系统或者相应包都很快
sudo gedit /etc/apt/sources.list
替换原来的源为USTC地址
# 默认注释了源码仓库,如有需要可自行取消注释 deb https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-updates main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-backports main restricted universe multiverse deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-security main restricted universe multiverse # 预发布软件源,不建议启用 # deb https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse # deb-src https://mirrors.ustc.edu.cn/ubuntu/ xenial-proposed main restricted universe multiverse
更新完之后运行更新源,就可以安装ros或者ros包
sudo apt-get update #sudo apt-get install ros-kinetic-desktop-full sudo apt-get install ros-kinetic-packagename
2. ubuntu下执行apt-get update 报异常
异常如下: W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: Unknown Multi-Arch type 'no' for package 'compiz-core' W: Unknown Multi-Arch type 'no' for package 'compiz-gnome' W: You may want to run apt-get update to correct these problems
apt与当前版本的ubuntun系统不匹配,ubuntun版本高于apt的版本.所以升级一下apt 就行了
解决方案:
sudo dpkg --configure -a sudo apt-get install -f sudo apt-get apt upgrade sudo apt-get update
或者
apt-get install -f apt