I need to install packages within non-internet connection environment. My plan is to
download dist structure from Internet and then add file
path to /etc/apt/sources.list.
So I download related structure includes ubunt/dists/precise, precise-backports, precise-proposed, precise-security, precise-updates from a ftp mirror server.
And then I remove original source and add the following to my /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
Then I got GPG error as following after apt-get update.
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 <
[email protected]>
I had tried use the following steps after google but in vain.
sudo apt-get clean
cd /var/lib/apt
sudo mv lists lists.old
sudo mkdir -p lists/partial
sudo apt-get update
Is there any way to resolve this? And why this error occurs? Thanks a lot.