2012-09-03 18 views
-1

我需要在非Internet連接環境中安裝軟件包。我的計劃是從 從互聯網下載dist結構,然後將文件路徑添加到/etc/apt/sources.list。在/etc/apt/sources.list中使用「deb file:/ local-path-to-repo ...」時發生GPG錯誤

因此,我從ftp鏡像服務器上下載了相關的結構,包括ubunt/dists /精確的,精確的backports,精確建議的,精確的安全的,精確的更新。

然後我刪除原始來源並將以下內容添加到我的/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 

然後我得到GPG錯誤如下apt-get更新後。

[email protected]:/~# 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 <[email protected]> 

我曾嘗試在谷歌之後使用以下步驟,但徒勞無益。

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

有什麼辦法可以解決這個問題嗎?爲什麼會發生這種錯誤?非常感謝。

回答

0

經過大量的調查和嘗試。我認爲問題可能是文件完整性問題。 因此,我重新下載整個dist /精確和更新沒有任何問題。