【关于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

相关推荐
未济3 天前
linux 配置环境变量
linux
傲世仙尊3 天前
目录即文件-Ext文件系统收尾篇
linux·c语言
虎头金猫3 天前
4K 视频总卡在公网带宽?用 N1 + OpenList 把网盘播放链路重新理顺
运维·服务器·网络·python·容器·beautifulsoup·pandas
_艾伦 耶格尔.3 天前
进程间通信
linux
AI职业加油站3 天前
AI智能体应用工程师证书:政策红利下的职业新风口
大数据·运维·人工智能·学习·职场发展
Liuqy-053 天前
Linux IO编程——静态库、动态库
linux
此冬歌咏3 天前
K8s 节点故障实战:优雅驱逐 31 秒,硬故障 331 秒,以及那个永远 Pending 的 Pod
运维·k8s
彧azz3 天前
Linux 环境下 Redis 学习总结:数据类型、持久化、锁、事务、主从与缓存问题
linux·redis·笔记·学习·面试
-梅3 天前
linux(8) 软硬链接
linux·运维·服务器
AIgorithmGEEK3 天前
[Linux]线程三部曲(上):一个执行流的诞生——从操作系统一路拆到 pthread_create
linux·线程·pid