mail:~# apt-get update Get:1 http://debian.cn99.com testing Release.gpg [189B] Hit http://debian.cn99.com testing Release Err http://debian.cn99.com testing Release Get:2 http://debian.cn99.com testing Release [68.5kB] Ign http://debian.cn99.com testing Release Hit http://debian.cn99.com testing/main Packages/DiffIndex Hit http://debian.cn99.com testing/non-free Packages/DiffIndex Hit http://debian.cn99.com testing/contrib Packages/DiffIndex Hit http://debian.cn99.com testing/main Sources/DiffIndex Hit http://debian.cn99.com testing/non-free Sources/DiffIndex Hit http://debian.cn99.com testing/contrib Sources/DiffIndex Fetched 68.7kB in 1s (39.7kB/s) Reading package lists... Done W: GPG error: http://debian.cn99.com testing Release: Unknown error executing gpgv W: You may want to run apt-get update to correct these problems
查找半天。。終於找到
apt-get/aptitude --WARNING--
作者 zgod 2007/04/22, 週日
W: GPG error: http://debian.linux.org.tw testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F W: You may want to run apt-get update to correct these problems
--------------------------------------------------------------------------------------------------- W: GPG error: ftp://debian.linux.org.tw testing Release: Unknown error executing gpgv W: You may want to run apt-get update to correct these problems
apt-get/aptitued 最常見到的錯誤訊息不呼就是這兩項
# aptitude update Get:1 ftp://debian.linux.org.tw testing Release.gpg [189B] Hit ftp://debian.linux.org.tw testing Release Err ftp://debian.linux.org.tw testing Release Get:2 ftp://debian.linux.org.tw testing Release [68.5kB] Ign ftp://debian.linux.org.tw testing Release Hit ftp://debian.linux.org.tw testing/main Packages/DiffIndex Hit ftp://debian.linux.org.tw testing/contrib Packages/DiffIndex Fetched 68.7kB in 1s (53.7kB/s) Reading package lists... Done W: GPG error: ftp://debian.linux.org.tw testing Release: Unknown error executing gpgv W: You may want to run apt-get update to correct these problems #
These errors are most of the times related to something is wrong with your keys. These keys are located here
# date Mon Apr 23 00:52:56 CST 2001 #
---可見真的是時間日期的錯誤,因此只需利用date這個指令來更改時間便可正常了
指令:date <月><日><時><分><年>
ex: date 042216552007
# aptitude update Get:1 ftp://debian.linux.org.tw testing Release.gpg [189B] Hit ftp://debian.linux.org.tw testing Release Hit ftp://debian.linux.org.tw testing/main Packages/DiffIndex Hit ftp://debian.linux.org.tw testing/contrib Packages/DiffIndex Fetched 189B in 1s (151B/s) Reading package lists... Done #
成功啦!!
------------------------------------------------------------------------------------------------------------------
另一個在apt-get update 會出現的錯誤是:
W: GPG error: http://debian.linux.org.tw testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F W: You may want to run apt-get update to correct these problems
曾經困擾我許久,還一度以為是站台掛點....|||
一連爬了好幾天的文,終於找到原因了...
可能原因有二:1. 未裝gnupg。 2. 憑證過期了,需要再到key server更新新的憑證。 於是先確認gnupg:
# dpkg -l gnupg ii gnupg 1.4.2-2 GNU privacy guard - a free PGP replacement ii gnupg-agent 1.9.20-1 GNU privacy guard - password agent ii gnupg-doc 2003.04.06-4 GNU Privacy Guard documentation ii gnupg2 1.9.20-1 GNU privacy guard - a free PGP replacement
發現已經確實安裝了!
那就是第二個原因囉
讓我們再看一次錯誤訊息:
W: GPG error: http://debian.linux.org.tw testing Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 010908312D230C5F W: You may want to run apt-get update to correct these problems
看來,真的是要求010908312D230C5F 的憑證key
那就自行加上吧
# gpg --keyserver keyring.debian.org --recv-keys 010908312D230C5F
keyring.debian.org <--key的來源站台
除此之外還有另一個 wwwkeys.eu.pgp.net
以下是runing 的訊息
gpg: keyring `/root/.gnupg/secring.gpg' created gpg: requesting key 2D230C5F from hkp server keyring.debian.org gpg: key 2D230C5F: public key "Debian Archive Automatic Signing Key (2006) < <script language="JavaScript" type="text/javascript">
/n </script> ftpmaster@debian.org <script language="JavaScript" type="text/javascript">
</script> 這個email住址已經被防垃圾郵件程式保護,您需要啟動Javascript才能觀看 <script language="JavaScript" type="text/javascript">
</script> >" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1
之後再add上key
# gpg --armor --export 010908312D230C5F| apt-key add -
gpg: no ultimately trusted keys found OK 看到ok就真的是ok了
再update 一次確定一下!
# apt-get update
Get:1 http://debian.linux.org.tw stable Release.gpg [189B] Get:2 http://debian.linux.org.tw testing Release.gpg [189B] Hit http://debian.linux.org.tw stable Release Hit http://debian.linux.org.tw testing Release Get:3 http://debian.linux.org.tw stable/main Packages [3349kB] Get:4 http://debian.linux.org.tw stable/main Sources [1322kB] Get:5 http://debian.linux.org.tw testing/main Packages [3813kB] Get:6 http://debian.linux.org.tw testing/main Sources [1465kB] Fetched 9948kB in 2s (3678kB/s) Reading package lists... Done