W: GPG 错误:http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy
InRelease: 下列签名无效: EXPKEYSIG F42ED6FBAB17C654 Open Robotics
info@osrfoundation.org E: 仓库
“http://mirrors.tuna.tsinghua.edu.cn/ros2/ubuntu jammy InRelease”
没有数字签名。 N: 无法安全地用该源进行更新,所以默认禁用该源。 N: 参见 apt-secure(8)
手册以了解仓库创建和用户配置方面的细节。

参考解决方案:Ubuntu 22.04 ros2 humble installing error GPG, libc-bin

1. 从/etc/apt/sources.list.d/ros2.list位置删除(管理员方式)了 ros2.list(如果它已经存在)。

在这里插入图片描述

2. 下载密钥

curl http://repo.ros2.org/repos.key | sudo apt-key add - 

将添加一个类似于 /etc/apt/trusted.gpg 的密钥 但名称可能会有所不同。您可以通过 sudo apt-key list 找到 key 的名称
在这里插入图片描述

3. 将文件 /etc/apt/trusted.gpg 复制到位置 /usr/share/keyrings 并将其重命名为 ros-archive-keyring.gpg

在这里插入图片描述

4. 往系统的 APT 源列表里添加 ROS 2 官方的软件源,方便你用 apt update/apt install 来安装 ROS 2 包。

参考教程:ROS2-Humble设置源

将 ROS 2 apt 存储库添加到您的系统中。
首先,确保 Ubuntu Universe 存储库已启用。

sudo apt install software-properties-common
sudo add-apt-repository universe

ros-apt-source 软件包为各种 ROS 存储库提供密钥和 apt 源配置。

安装 ros2-apt-source 软件包将为您的系统配置 ROS 2 存储库。当此软件包的新版本发布到 ROS 仓库时,仓库配置将自动更新。

sudo apt update && sudo apt install curl -y
export ROS_APT_SOURCE_VERSION=$(curl -s https://api.github.com/repos/ros-infrastructure/ros-apt-source/releases/latest | grep -F "tag_name" | awk -F\" '{print $4}')
curl -L -o /tmp/ros2-apt-source.deb "https://github.com/ros-infrastructure/ros-apt-source/releases/download/${ROS_APT_SOURCE_VERSION}/ros2-apt-source_${ROS_APT_SOURCE_VERSION}.$(. /etc/os-release && echo $VERSION_CODENAME)_all.deb" # If using Ubuntu derivates use $UBUNTU_CODENAME
sudo dpkg -i /tmp/ros2-apt-source.deb

可以正常执行sudo apt update

在这里插入图片描述

在这里插入图片描述

Logo

中国智能体开发者社区,聚焦智能体与大模型开发,提供前沿资讯、实用工具链、开源项目及行业案例。通过技术沙龙、开发者大赛等活动,促进经验交流与协作,助力开发者快速构建创新智能应用。

更多推荐