先备份系统原下载源: sudo cp /etc/apt/sources.list /etc/apt/sources_back.list
sudo vi /etc/apt/sources.list 将原有内容删除后添加如下内容: # 默认注释了源码镜像以提高 apt
update 速度,如有需要可自行取消注释 deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted
universe multiverse # deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal main restricted
universe multiverse deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-updates main
restricted universe multiverse # deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/
focal-updates main restricted universe multiverse deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main
restricted universe multiverse # deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-backports main
restricted universe multiverse # deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main
restricted universe multiverse # # deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-security main
restricted universe multiverse deb http://ports.ubuntu.com/ubuntu-ports/
focal-security main restricted universe multiverse # deb-src
http://ports.ubuntu.com/ubuntu-ports/ focal-security main restricted universe
multiverse # 预发布软件源,不建议启用 # deb
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-proposed main
restricted universe multiverse # # deb-src
https://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ focal-proposed main
restricted universe multiverse 添加ros下载源: sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.tuna.tsinghua.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list' 添加密匙: sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 更新并下载ros,再安装依赖: sudo apt update sudo apt install ros-noetic-desktop-full sudo apt install python3-rosdep python3-rosinstall python3-rosinstall-generator python3-wstool build-essential ros使用需要配置环境变量,可以放到.bashrc中自动执行: echo "source
/opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc 官方使用ros: sudo rosdep init rosdep update 外网可能下载失败,可以使用: sudo apt install python3-pip -y sudo pip3 install -i
https://pypi.tuna.tsinghua.edu.cn/** rosdepc sudo rosdepc init rosdepc update 所有东西都下载好后,可以改回默认的下载源: sudo cp /etc/apt/sources_back.list
/etc/apt/sources.list |
|小黑屋| 飞凌嵌入式 ( 冀ICP备12004394号-1 )
GMT+8, 2024-11-22 09:08
Powered by Discuz! X3.4
© 2001-2013 Comsenz Inc.