在ubantu22.10 执行apt update时,遇到 Certificate verification failed: The certificate is NOT trusted. The name in the certificate does not match the expected. Could not handshake: Error in the certificate verification 这个问题。
通过查询得知是证书失效,需要重新安装ca-certificates
sudo apt-get install --reinstall ca-certificates
如果安装完成后,还是无法解决问题, 根据报错信息,把报错上面对应网址由https更改为http。本文中为
https://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
更改为
http://apt.postgresql.org/pub/repos/apt jammy-pgdg InRelease
更新源
sudo apt-get update
问题解决~