之前好好的,就今天执行 sudo apt update 时报错:
~# sudo apt update
Hit:3 http://mirrors.aliyun.com/ubuntu-ports focal InRelease
Ign:1 https://wiki.t-firefly.com/firefly-ubuntu-repo focal InRelease
Get:5 http://mirrors.aliyun.com/ubuntu-ports focal-updates InRelease [114 kB]
Ign:2 https://wiki.t-firefly.com/firefly-rk3588-repo focal InRelease
Err:4 https://wiki.t-firefly.com/firefly-ubuntu-repo focal Release
Certificate verification failed: The certificate is NOT trusted. The certifica
te chain uses not yet valid certificate. Could not handshake: Error in the cert
ificate verification. [IP: 118.31.112.34 443]
Err:6 https://wiki.t-firefly.com/firefly-rk3588-repo focal Release
Certificate verification failed: The certificate is NOT trusted. The certifica
te chain uses not yet valid certificate. Could not handshake: Error in the cert
ificate verification. [IP: 118.31.112.34 443]
Get:7 http://mirrors.aliyun.com/ubuntu-ports focal-backports InRelease [108 kB]
Get:8 http://mirrors.aliyun.com/ubuntu-ports focal-security InRelease [114 kB]
Reading package lists... Done
E: The repository 'http://wiki.t-firefly.com/firefly-ubuntu-repo focal Release'
no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disa
bled by default.
N: See apt-secure(8) manpage for repository creation and user configuration deta
ils.
E: The repository 'http://wiki.t-firefly.com/firefly-rk3588-repo focal Release'
no longer has a Release file.
N: Updating from such a repository can't be done securely, and is therefore disa
bled by default.
N: See apt-secure(8) manpage for repository creation and user configuration deta
ils.
E: Release file for http://mirrors.aliyun.com/ubuntu-ports/dists/focal-updates/I
nRelease is not valid yet (invalid for another 199d 11h 14min 24s). Updates for
this repository will not be applied.
E: Release file for http://mirrors.aliyun.com/ubuntu-ports/dists/focal-backports
/InRelease is not valid yet (invalid for another 199d 9h 54min 26s). Updates for
this repository will not be applied.
E: Release file for http://mirrors.aliyun.com/ubuntu-ports/dists/focal-security/
InRelease is not valid yet (invalid for another 199d 9h 50min 32s). Updates for
this repository will not be applied.
试过网上其他的方法,包括更换/etc/apt/source.list文件,可能是出错原因不同,均没有效果。
查看上面报错:E:http://mirrors.aliyun.com/ubuntu-ports/dists/focal-updates/I nRelease 的发布文件尚未生效(再过 199d 11h 19min 26s 即失效)。将不会应用该版本库的更新。
后来想到,可能是日期的问题,查看发现ubuntu的日期不对,是5月份,而现在是10月份,这个可能会导致更新失败。
修改系统时间为当前的日期后,再次执行 sudo apt update 成功!