【问题标题】:GPG error occurs while using "deb file:/local-path-to-repo ..." in /etc/apt/sources.list在 /etc/apt/sources.list 中使用“deb file:/local-path-to-repo ...”时发生 GPG 错误
【发布时间】:2012-08-27 19:50:37
【问题描述】:

我需要在非互联网连接环境中安装软件包。我的计划是 从 Internet 下载 dist 结构,然后将文件路径添加到 /etc/apt/sources.list。

所以我从 ftp 镜像服务器下载了相关结构,包括 ubunt/dists/precise、precision-backports、precision-proposed、precision-security、precision-updates。

然后我删除原始源并将以下内容添加到我的 /etc/apt/sources.list。

deb file:path-to-local-ubuntu-directory/ precise main restricted multiverse universe
deb-src file:path-to-local-ubuntu-directory/ precise main restricted multiverse universe

然后我在 apt-get update 后得到如下 GPG 错误。

root@openstack:/~# apt-get update
Ign file: precise InRelease
Get:1 file: precise Release.gpg [198 B]
Get:2 file: precise Release [50.1 kB]
Ign file: precise Release
Get:3 file: precise/main TranslationIndex [3,761 B]
Get:4 file: precise/multiverse TranslationIndex [2,716 B]
Get:5 file: precise/restricted TranslationIndex [2,636 B]
Get:6 file: precise/universe TranslationIndex [2,965 B]
Reading package lists... Done
W: GPG error: file: precise Release: The following signatures were invalid: BADSIG 0976EAF437D05B5 Ubuntu Archive Automatic Signing Key <ftpmaster@ubuntu.com>

我曾尝试在 google 之后使用以下步骤,但徒劳无功。

sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update

有没有办法解决这个问题?为什么会出现这个错误?非常感谢。

【问题讨论】:

    标签: ubuntu package apt system-administration


    【解决方案1】:

    经过大量调查和尝试。我认为问题可能是文件完整性问题。 所以我重新下载了整个 dist/precise 和更新没有任何问题。

    【讨论】:

      猜你喜欢
      • 2015-02-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-08
      • 1970-01-01
      • 2023-03-22
      • 1970-01-01
      • 2018-10-25
      相关资源
      最近更新 更多