【关于Ubuntu换源的问题】/Ubuntu 软件更新和ros软件包定位

关于Ubuntu换源的问题

报错如下:

复制代码
E: 仓库 "http://ppa.launchpad.net/zarquon42/meshlab/ubuntu focal Release" 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。

....

W: 目标 DEP-11-icons (main/dep11/icons-64x64.tar) 在 /etc/apt/sources.list:60 和 /etc/apt/sources.list.d/librealsense.list:1 中被配置了多次
W: 目标 DEP-11-icons-hidpi (main/dep11/icons-64x64@2.tar) 在 /etc/apt/sources.list:60 和 /etc/apt/sources.list.d/librealsense.list:1 中被配置了多次
W: 目标 CNF (main/cnf/Commands-amd64) 在 /etc/apt/sources.list:60 和 /etc/apt/sources.list.d/librealsense.list:1 中被配置了多次
W: 目标 CNF (main/cnf/Commands-all) 在 /etc/apt/sources.list:60 和 /etc/apt/sources.list.d/librealsense.list:1 中被配置了多次

修改:

直接修改源文件列表,更换所有的源链接

复制代码
pf@pf-NUC12WSKi7:/etc/apt$ sudo gedit /etc/apt/sources.list

更换的链接内容如下:

复制代码
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse

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

自己用的比较爽的

继续更新报错

复制代码
命中:18 https://librealsense.intel.com/Debian/apt-repo focal InRelease
正在读取软件包列表... 完成
E: 仓库 "http://ppa.launchpad.net/zarquon42/meshlab/ubuntu focal Release" 没有 Release 文件。
N: 无法安全地用该源进行更新,所以默认禁用该源。
N: 参见 apt-secure(8) 手册以了解仓库创建和用户配置方面的细节。

执行:

bash 复制代码
pf@pf-NUC12WSKi7:/etc/apt$ cd /etc/apt/sources.list.d
pf@pf-NUC12WSKi7:/etc/apt/sources.list.d$ ls
fossfreedom-ubuntu-indicator-sysmonitor-focal.list
fossfreedom-ubuntu-indicator-sysmonitor-focal.list.save
google-chrome.list
google-chrome.list.save
librealsense.list
librealsense.list.save
ros-latest.list
ros-latest.list.save
vscode.list
vscode.list.save
zarquon42-ubuntu-meshlab-focal.list
zarquon42-ubuntu-meshlab-focal.list.save
复制代码
移除最后两行即可,使用rm/mv指令都可以
zarquon42-ubuntu-meshlab-focal.list
zarquon42-ubuntu-meshlab-focal.list.save

再次更新软件源即可

复制代码
sudo apt-get update

关于ros 找不到软件安装包的问题

对于Ubuntu 20.04 也即是,对应的ROS镜像是focal版本,USTC的镜像发现没有focal版本的,http://mirrors.ustc.edu.cn/ros/ubuntu/dists/ 这个镜像源有xenial等其他版本的ubuntu镜像。ROS镜像在wiki上查找国内可用的镜像,发现清华镜像有focal版本的,即noetic版本。

更换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

经过上面的更改后,

执行sudo apt-get update

相关推荐
阿里云大数据AI技术12 小时前
阿里云 EMR AI 助手正式发布:从问答工具到全栈智能运维助手
运维·人工智能
orion571 天前
Missing Semester Class1:course overview and introduction of shell
linux
SkyWalking中文站1 天前
认识 Horizon UI · 6/17:Trace 探索器
运维·监控·自动化运维
用户120487221611 天前
Linux驱动编译与加载
linux·嵌入式
火车叼位2 天前
写给初级开发者:SSL、SSH、HTTPS 与证书体系全解析
运维
用户805533698032 天前
Input 子系统架构:Core、Handler、Driver 三层是怎么协作的
linux·嵌入式
用户805533698032 天前
RK-Forge外设系列开篇 - 把板子从「能启动」变成「能用」:Ethernet/SPI/MMC 三个纯接线外设
linux·github·嵌入式
小猿姐2 天前
唯品会大规模数据库云原生实践:基于 KubeBlocks 管理数千实例的统一运维之路
运维·elasticsearch·云原生
七歌杜金房2 天前
我终于又有了自己的 Linux 电脑
linux·debian·mac
SkyWalking中文站3 天前
认识 Horizon UI · 5/17:3D 基础设施地图
运维·监控·自动化运维