Apt

Debian - “警告:將安裝以下軟體包的不受信任版本!”

  • March 31, 2015

當我嘗試安裝或更新我得到的任何軟體包時:

Untrusted packages could compromise your system's security. You should only proceed with the installation if you are certain that this is what you want to do.

我強烈懷疑這與我在更新時遇到的錯誤有關:

$ sudo aptitude update
Get: 1 http://ftp.us.debian.org wheezy InRelease [208 kB]
Get: 2 http://debian.lcs.mit.edu wheezy InRelease [208 kB]
Ign http://ftp.us.debian.org wheezy InRelease
Hit http://ftp.us.debian.org wheezy/main amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/contrib amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/non-free amd64 Packages/DiffIndex
Hit http://ftp.us.debian.org wheezy/contrib Translation-en
Hit http://ftp.us.debian.org wheezy/main Translation-en
Hit http://ftp.us.debian.org wheezy/non-free Translation-en
Get: 3 http://debian.lcs.mit.edu wheezy-updates InRelease [116 kB]
Ign http://debian.lcs.mit.edu wheezy InRelease
Ign http://debian.lcs.mit.edu wheezy-updates InRelease
Hit http://debian.lcs.mit.edu wheezy/main Sources/DiffIndex
Hit http://debian.lcs.mit.edu wheezy/main amd64 Packages/DiffIndex
Hit http://debian.lcs.mit.edu wheezy/main Translation-en
Ign http://ftp.us.debian.org wheezy/contrib Translation-en_US
Ign http://debian.lcs.mit.edu wheezy-updates/main Sources/DiffIndex
Ign http://debian.lcs.mit.edu wheezy-updates/main amd64 Packages/DiffIndex
Ign http://ftp.us.debian.org wheezy/main Translation-en_US
Ign http://ftp.us.debian.org wheezy/non-free Translation-en_US
Hit http://debian.lcs.mit.edu wheezy-updates/main Sources
Hit http://debian.lcs.mit.edu wheezy-updates/main amd64 Packages
Ign http://debian.lcs.mit.edu wheezy/main Translation-en_US
Ign http://debian.lcs.mit.edu wheezy-updates/main Translation-en_US
Ign http://debian.lcs.mit.edu wheezy-updates/main Translation-en
Fetched 531 kB in 1s (304 kB/s)
W: GPG error: http://ftp.us.debian.org wheezy InRelease: Unknown error executing gpgv
W: GPG error: http://debian.lcs.mit.edu wheezy InRelease: Unknown error executing gpgv
W: GPG error: http://debian.lcs.mit.edu wheezy-updates InRelease: Unknown error executing gpgv

我試過重新安裝鑰匙圈:( sudo aptitude reinstall debian-archive-keyring 令人驚訝的是不會引起警告)。

請試試這個:

打開終端並執行以下命令:

sudo apt-get clean
sudo rm -rf /var/lib/apt/lists/*
sudo apt-get clean
sudo apt-get update

閱讀APZ 的答案後,但想使用aptitude我成功執行了以下命令:

# clean the obsolete cache
sudo aptitude clean
# update the package information
sudo aptitude update
# install or upgrade the packages
sudo aptitude install <list of packages to upgrade/install>

該錯誤可能與過時的 apt 記憶體內容有關,但我得到的錯誤消息有點不同:

警告:將安裝以下軟體包的不受信任版本!

引用自:https://serverfault.com/questions/444798