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

相关推荐
Dobby_0511 小时前
【Linux】网络安全管理:SELinux 和 防火墙联合使用 | Redhat
linux·运维·云原生·防火墙·selinux
davenian12 小时前
< 自用文 OS 有关 > (续)发现正在被攻击 后的自救 Fail2ban + IPset + UFW 工作流程详解
ubuntu·bash·fail2ban·ipset
cetcht888812 小时前
安徽某能源企业积极推进运维智能化转型,引入高压配电房机器人巡检系统
运维·人工智能·物联网·机器人·能源
wheeldown12 小时前
【Linux】Linux进程状态和僵尸进程:一篇看懂“进程在忙啥”
linux·运维·服务器·进程
jzwalliser12 小时前
关于Linux生态的补充
linux·语言暴力
半桔12 小时前
【Linux手册】动静态库:从原理到制作
linux·运维·服务器·动态库
z2023050812 小时前
Linux之块设备的多队列的实现机制
linux·运维·服务器
liulilittle12 小时前
Unix/Linux 平台通过 IP 地址获取接口名的 C++ 实现
linux·开发语言·c++·tcp/ip·unix·编程语言
阿贤Linux13 小时前
设置网卡名称为传统命名方式
linux·ubuntu