尝试使用 APT 更新时出现 GPG 警告和获取失败错误

尝试使用 APT 更新时出现 GPG 警告和获取失败错误

我是 Ubuntu 的新用户。我尝试更新我的 Ubuntu,但出现了这些错误。

Reading package list... Done
W: http://archive.canonical.com/ubuntu/dists/precise/Release.gpg:
    Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us.archive.ubuntu.com/ubuntu/dists/precise-security/InRelease:  
    Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us.archive.ubuntu.com/ubuntu/dists/precise-updates/InRelease:  
    Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us.archive.ubuntu.com/ubuntu/dists/precise-backports/InRelease:  
    Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: http://us.archive.canonical.com/ubuntu/dists/precise/Release.gpg:
    Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: The repository 'http://ppa.launchpad.net/tualatrix/ppa/next/ubuntu xenial Release' does not have a Release file.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://extras.ubuntu.com/ubuntu precise Release: 
    The following signatures couldn't be verified because the public key is not available: 
    NO_PUBKEY 16126D3A3E5C1192
W: The repository 'http://extras.ubuntu.com/ubuntu precise Release' is not signed.
N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.
E: Failed to fetch http://ppa.launchpad.net/tualatrix/ppa/next/ubuntu/dists/xenial/main/source/Sources  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead

如何解决这些问题?

答案1

刚刚检查了抱怨“无法获取”错误的 PPA。

来自该 PPA 的 dist 目录,它没有适用于 Xenial 的版本。因此唯一的解决方案可能是删除该 ppa。

如果您从 12.04 升级到 16.04,您可以尝试使用以下命令删除该 ppa: sudo add-apt-repository --remove ppa:tualatrix/next

并使用 更新软件列表sudo apt-get update,然后您就可以继续升级任务了。

或者您可以尝试升级到 14.04,该 ppa 可用于 Trusty。

答案2

  • 逐个执行以下命令..
  • rm -rf /var/lib/apt/lists/*
  • 如果使用代理,请在具有 root 权限的终端中使用以下命令导出代理设置:
  • 导出 http_proxy=http://代理地址:端口
  • 运行添加 ppa 并使用 sudo 环境设置
  • sudo -E 添加 apt-repository

相关内容