apt-get update 一直报证书错误 Certificate verification failed

apt-get update 一直报证书错误 Certificate verification failedCertificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake:…

起因是在 盒子上安装 debian,安装好以后,执行apt-get update 始终报错:

Err:9 mirrors.cloud.tencent.com/debian-secu… buster/updates Release Certificate verification failed: The certificate is NOT trusted. The certificate chain uses not yet valid certificate. Could not handshake: Error in the certificate verification. [IP: 111.231.36.190 443] Reading package lists… Done

E: The repository ‘mirrors.cloud.tencent.com/debian-secu… buster/updates Release’ does not have a Release file.

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.

E: Release file for mirrors.cloud.tencent.com/debian/dist… is not valid yet (invalid for another 358d 15h 15min 43s). Updates for this repository will not be applied.

E: Release file for mirrors.cloud.tencent.com/debian/dist… is not valid yet (invalid for another 392d 0h 45min 16s). Updates for this repository will not be applied.

E: Release file for mirrors.cloud.tencent.com/debian/dist… is not valid yet (invalid for another 392d 0h 45min 15s). Updates for this repository will not be applied.

期间就算切换源 也没用, 切了各大学,各大企业 的源,都报 证书校验错误。

尝试强制在 /etc/apt/sources.list 添加 trusted=yes 也不行。

deb [trusted=yes] mirrors.ustc.edu.cn/debian/ buster main contrib non-free

各种更新证书的方式也试了,没有一个有效。

最后发现是 机器时间设置 问题,因为证书校验是 时间敏感的。 而我的机器时间还停留在去年。

搜到了 stackoverflow.com/questions/2… 这里,才看到了 答案:

Another cause of this problem might be that your clock might be off. Certificates are time sensitive. To check the current system time:

date -R

You might consider installing NTP to automatically sync the system time with trusted internet timeservers from the global NTP pool. For example, to install on Debian/Ubuntu: apt-get install ntp

apt-get install ntp

耽误了得有一天时间, 罪过!

今天的文章apt-get update 一直报证书错误 Certificate verification failed分享到此就结束了,感谢您的阅读。

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/20115.html

(0)
编程小号编程小号

相关推荐

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注