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

相关推荐
Fleshy数模7 小时前
MySQL 表创建全攻略:Navicat 图形化与 Xshell 命令行双模式实践
linux·mysql
神梦流7 小时前
GE 引擎的非标准数据流处理:稀疏张量与自定义算子在图优化中的语义保持
linux·运维·服务器
兜兜转转了多少年7 小时前
从脚本到系统:2026 年 AI 代理驱动的 Shell 自动化
运维·人工智能·自动化
EHagSJVNpTY8 小时前
MATLAB 中基于最大重叠离散小波变换的心电信号处理探索
ubuntu
.小墨迹8 小时前
apollo学习之借道超车的速度规划
linux·c++·学习·算法·ubuntu
Lsir10110_8 小时前
【Linux】中断 —— 操作系统的运行基石
linux·运维·嵌入式硬件
Sheffield8 小时前
command和shell模块到底区别在哪?
linux·云计算·ansible
历程里程碑9 小时前
Linux20 : IO
linux·c语言·开发语言·数据结构·c++·算法
郝学胜-神的一滴9 小时前
深入浅出:使用Linux系统函数构建高性能TCP服务器
linux·服务器·开发语言·网络·c++·tcp/ip·程序人生
承渊政道9 小时前
Linux系统学习【Linux系统的进度条实现、版本控制器git和调试器gdb介绍】
linux·开发语言·笔记·git·学习·gitee