【关于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/[email protected]) 在 /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

相关推荐
sz66cm几秒前
Linux基础 -- 用户态Generic Netlink库高性能接收与回调框架
linux
数巨小码人8 分钟前
Linux常见命令
大数据·linux·运维·服务器·elasticsearch·搜索引擎
邪恶的贝利亚28 分钟前
定时器设计
java·linux·前端
magic 2451 小时前
第五章:Linux用户管理
linux·运维·服务器
前进的程序员1 小时前
C++ 在 Windows 和 Linux 平台上的开发差异及常见问题
linux·c++·windows
Wangyh021 小时前
Yocto Project 快速构建
linux
小叶子来了啊1 小时前
信息系统运行管理员:临阵磨枪版
运维·服务器·数据库
-天涯761 小时前
5.13/14 linux安装centos及一些操作命令随记
linux·运维·服务器
佩奇的技术笔记1 小时前
CentOS系统中升级Python 3.12.2版本
linux·运维·服务器
Fireworkitte1 小时前
CentOS 和 RHEL
linux·centos