ubuntu22.04 arm64进行换源过程中遇到的问题

1.要使用arm64架构对应的镜像源

以中科大镜像源为例
https://mirrors.ustc.edu.cn/help/ubuntu-ports.html
应使用该文档中提供的镜像仓库的源,而不是一般的对应x86架构的镜像源

2.证书认证问题

在执行sudo apt-get update命令后,其可能会出现如下几个问题
(该问题造成的原因可能是因为镜像源地址使用了https协议)

  1. No system certificates available. Try installing ca-certificates.
    此时需安装以下包apt install apt-transport-https ca-certificates
  2. The following signatures couldn't be verified because the public key is not available: NO_PUBKEY XXXXXXXXXX
    在安装完包后重新执行sudo apt-get update,可能会提示key不可用的错误
    此时需重新生成key
    执行命令sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3B4FE6ACC0B21F32
    或者sudo gpg --keyserver keyserver.ubuntu.com --recv-keys 467B942D3A79BD29 其中命令中最后一串代码为错误提示中no_pubkey后面的内容
  3. W: https://mirrors.ustc.edu.cn/ubuntu/dists/bionic/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
    在重新生成key后,可能会出现类似警告,此时应执行以下命令
    sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d

参考:
1.https://www.jianshu.com/p/4633b5f39dfb
2.https://blog.csdn.net/u010953609/article/details/123798066
3.https://blog.csdn.net/TineAine/article/details/118455874
4.https://zhuanlan.zhihu.com/p/545562681

posted @ 2023-01-10 22:59  DLKKILL  阅读(2706)  评论(0编辑  收藏  举报