无法更新软件包 - “无法下载软件包文件。请检查互联网...”或“需要从未经身份验证的来源安装”

无法更新软件包 - “无法下载软件包文件。请检查互联网...”或“需要从未经身份验证的来源安装”

我第一次得到这个

Failed to download package files. Check internet connection

错误并尝试解决方案对于大多数遇到同样问题的人来说,这似乎很有效……更改下载位置。我尝试了几个不同的服务器,但都没有效果。我还尝试了上面链接中的第二种解决方案(让 apt 创建一个新源列表文件)。

最近,错误变成了“安装需要从未经认证的来源进行安装”。这个帖子与上面第一个链接中的第二个解决方案相同,对我的情况没有影响。在我开始添加公钥或任何其他解决方案之前,我认为最好是具体发布我的输出,看看社区怎么说。

这是我的输出为了apt-get update

这是我的输出为了apt-get upgrade

我的声誉不够高,无法发布超过两个链接,因此这里直接输出/etc/apt/sources.list

~$ cat /etc/apt/sources.list
# deb cdrom:[Ubuntu 14.04.3 LTS _Trusty Tahr_ - Beta amd64 (20150805)]/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty main restricted #Added by software-properties

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty universe multiverse #Added by software-properties

## Major bug fix updates produced after the final release of the
## distribution.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe main multiverse restricted #Added by software-properties

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates universe

## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty multiverse
deb http://us.archive.ubuntu.com/ubuntu/ trusty-updates multiverse

## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
deb http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse #Added by software-properties

deb http://us.archive.ubuntu.com/ubuntu/ trusty-security main restricted
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-security universe main multiverse restricted #Added by software-properties
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security universe
deb http://us.archive.ubuntu.com/ubuntu/ trusty-security multiverse

## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
deb http://archive.canonical.com/ubuntu trusty partner
# deb-src http://archive.canonical.com/ubuntu trusty partner

## This software is not part of Ubuntu, but is offered by third-party
## developers who want to ship their latest software.
deb http://extras.ubuntu.com/ubuntu trusty main
deb-src http://extras.ubuntu.com/ubuntu trusty main

## added myself -- http://stackoverflow.com/questions/29630434/graphviz-installation-ubuntu-14-04
deb http://security.ubuntu.com/ubuntu lucid-security main
deb http://cz.archive.ubuntu.com/ubuntu lucid main
deb http://repository.spotify.com stable non-free
# deb-src http://repository.spotify.com stable non-free
# deb-src http://repository.spotify.com stable non-free
deb http://us.archive.ubuntu.com/ubuntu/ trusty-proposed multiverse restricted universe main
deb-src http://us.archive.ubuntu.com/ubuntu/ trusty-proposed multiverse restricted universe main #Added by software-properties

根据输出底部的第 6 个错误apt-get update,似乎至少有一个问题是无法验证来自 Nvidia 的某些包(可能是我刚才安装的 cuda 存储库——我这样做是不是太愚蠢了?)。

不确定下一步该做什么,希望得到任何指导!提前致谢。

答案1

  • 不确定你为什么要将 lucid 存储库添加到 trusty,但无论如何应该已经知道你在做什么。Lucid 已到使用寿命结束,其存储库已移至http://old-releases.ubuntu.com/因此将这些行更改为:

    deb http://old-releases.ubuntu.com/ubuntu lucid-security main
    deb http://old-releases.ubuntu.com/ubuntu lucid main
    
  • 对于有关 cuda 包身份验证的第二个错误,您的系统缺少 nvidia 存储库 GPG 公钥,请使用以下方式添加它

    wget -q http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub -O- | sudo apt-key add -
    

相关内容