在 Ubuntu 16.04 中更新軟體包清單時如何修復錯誤?

在 Ubuntu 16.04 中更新軟體包清單時如何修復錯誤?

當我嘗試更新我的系統時出現此錯誤烏班圖16.04。我已經嘗試了一些解決方案,但到目前為止沒有任何效果。

錯誤:

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: 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.
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.ubuntu.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
W: The repository 'http://ppa.launchpad.net/upubuntu-com/network/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.
E: Failed to fetch http://ppa.launchpad.net/upubuntu-com/network/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

取消選取一些不需要的套件/儲存庫後從軟體和更新部分,我設法消除了一些錯誤,但仍然存在一些錯誤:

 The repository 'http://ppa.launchpad.net/upubuntu-com/network/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: http://archive.canonical.com/ubuntu/dists/precise/Release.gpg: Signature by key 630239CC130E1A7FD81A27B140976EAF437D05B5 uses weak digest algorithm (SHA1)
 E: Failed to fetch http://ppa.launchpad.net/upubuntu-com/network/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
 E: Some index files failed to download. They have been ignored, or old ones used instead.

應用解決方案後下面提供(由 Raphael 提供),大多數錯誤都得到了解決。除了這些錯誤:

 W: The repository 'http://ppa.launchpad.net/upubuntu-com/network/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.
 E: Failed to fetch http://ppa.launchpad.net/upubuntu-com/network/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found
 E: Some index files failed to download. They have been ignored, or old ones used instead.

答案1

您正在使用,Xenial但您sources.list包含 的連結Precise。為了糾正這個問題,

  • 備份您目前的sources.list

    sudo mv /etc/apt/sources.list /etc/apt/sources.list.bak
    
  • 建立一個新的source.list

    sudo nano /etc/apt/sources.list
    
  • 將以下內容複製並貼上其中:

    deb http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 
    deb-src http://us.archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse 
    deb http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 
    deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse 
    deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse 
    deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-proposed main restricted universe multiverse 
    deb-src http://us.archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse 
    
  • 然後,在鍵盤上按以下命令:

    Ctrl+X然後Y和最後Enter

  • 最後,嘗試更新您的來源:

    sudo apt-get update
    

編輯:-ppa錯誤就是它所說的。沒有ppa.Xenial要刪除ppas,請遵循以下答案:詢問Ubuntu

相關內容