RDK系列apt相关报错解决方法

1. 密钥错误

Err:1 http://sunrise.horizon.cc/ubuntu-journey focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 599F576057BDF67C
Err:2 http://sunrise.horizon.cc/ubuntu-rdkultra focal InRelease
  The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 599F576057BDF67C

使用以下命令更新密钥:

sudo wget -O /usr/share/keyrings/sunrise.gpg http://sunrise.horizon.cc/keys/sunrise.gpg
sudo apt update

2. 最近源的主域名换成了archive.d-robotics.cc,所以sudo apt update时会报如下错误:

sunrise@ubuntu:~$ sudo apt update
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-security InRelease
Hit:3 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-updates InRelease
Hit:4 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-backports InRelease
Hit:5 http://packages.ros.org/ros2/ubuntu focal InRelease
Get:6 http://archive.sunrisepi.tech/ubuntu-rdk focal InRelease
Err:6 http://archive.sunrisepi.tech/ubuntu-rdk focal InRelease
  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)

Reading package lists... Done
E: Failed to fetch http://archive.sunrisepi.tech/ubuntu-rdk/dists/focal/InRelease  Clearsigned file isn't valid, got 'NOSPLIT' (does the network require authentication?)
E: The repository 'http://archive.sunrisepi.tech/ubuntu-rdk focal InRelease' is no longer signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.

RDK Ultra会报如下错误:

root@ubuntu:~# apt update
Hit:1 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal InRelease
Hit:2 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-security InRelease
Err:3 http://archive.sunrisepi.tech/ubuntu-journey focal InRelease
  Could not resolve 'archive.sunrisepi.tech'
Err:4 http://archive.sunrisepi.tech/ubuntu-rdkultra focal InRelease
  Could not resolve 'archive.sunrisepi.tech'
Hit:5 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-updates InRelease
Hit:6 http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports focal-backports InRelease
Hit:7 http://packages.ros.org/ros2/ubuntu focal InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
180 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: Failed to fetch http://archive.sunrisepi.tech/ubuntu-journey/dists/focal/InRelease  Could not resolve 'archive.sunrisepi.tech'
W: Failed to fetch http://archive.sunrisepi.tech/ubuntu-rdkultra/dists/focal/InRelease  Could not resolve 'archive.sunrisepi.tech'
W: Some index files failed to download. They have been ignored, or old ones used instead.

可以采用以下命令将源替换,解决这个问题:

sudo sed -i 's/archive\.sunrisepi\.tech/archive\.d-robotics\.cc/g' /etc/apt/sources.list.d/sunrise.list

或者:

sudo sed -i 's/sunrise\.horizon\.cc/archive\.d-robotics\.cc/g' /etc/apt/sources.list.d/sunrise.list

使用命令:sudo sed -i ‘s/archive\.sunrisepi\.tech/archive\.d-robotics\.cc/g’ /etc/apt/sources.list.d/sunrise.list 替换了源,但是会报错,使用的有线网。

执行了:sudo sed -i ‘s/sunrise\.horizon\.cc/archive\.d-robotics\.cc/g’ /etc/apt/sources.list.d/sunrise.list

结果还是:-
我用的是X5, 是不是Jammy下面没有这个包?

开发手册里用的还是sunrisepi,为啥不改呢

有没有3.0.0的源

按照这个改了还是报错

您好,您这个不是地平线换域名导致的错误了,请检查您的源设置。RDK X3 & Module 自带的源改乱了怎么改回来 (horizon.cc)

3.0.0的系统全都更新完毕,不涉及老域名的问题

按照这个改完之后错误还是一样

请把你的ros2源删除,ros2的源不由地平线维护,请更换其他可用的ros2源