sudo apt-get update在ubuntu 12.04中失败了

时间:2016-05-03 21:09:08

标签: ubuntu ubuntu-12.04 apt-get salt-stack

我正在尝试更新apt-get以安装salt-minion但我收到错误 GPG错误:http://repo.saltstack.com精确版本:由于公钥无法验证以下签名不可用:NO_PUBKEY 0E08A149DE57BFBE 所以我无法更新然后安装我需要的东西

root@PrestezaAlpha:/etc/apt/sources.list.d# sudo apt-get update
Get:1 http://security.ubuntu.com precise-security Release.gpg [198 B]
Get:2 http://repo.saltstack.com precise Release.gpg [490 B]                    
Get:3 http://security.ubuntu.com precise-security Release [55.5 kB]            
Hit http://repo.saltstack.com precise Release                                  
Ign http://repo.saltstack.com precise Release                                  
Ign http://repo.saltstack.com precise/main i386 Packages/DiffIndex             
Ign http://repo.saltstack.com precise/main TranslationIndex                    
Hit http://apt.newrelic.com newrelic Release.gpg                               
Get:4 http://security.ubuntu.com precise-security/main i386 Packages [658 kB]  
Hit http://apt.newrelic.com newrelic Release                                   
Hit http://repo.saltstack.com precise/main i386 Packages                       
Ign http://repo.saltstack.com precise/main Translation-en                      
Hit http://apt.newrelic.com newrelic/non-free i386 Packages                    
Ign http://apt.newrelic.com newrelic/non-free TranslationIndex                 
Get:5 http://security.ubuntu.com precise-security/main TranslationIndex [208 B]
Get:6 http://security.ubuntu.com precise-security/main Translation-en [252 kB] 
Hit http://archive.ubuntu.com precise Release.gpg                              
Get:7 http://archive.ubuntu.com precise-updates Release.gpg [198 B]            
Ign http://apt.newrelic.com newrelic/non-free Translation-en                   
Hit http://archive.ubuntu.com precise Release                                  
Get:8 http://archive.ubuntu.com precise-updates Release [55.4 kB]       
Hit http://archive.ubuntu.com precise/main i386 Packages  
Hit http://archive.ubuntu.com precise/universe i386 Packages
Hit http://archive.ubuntu.com precise/main TranslationIndex
Hit http://archive.ubuntu.com precise/universe TranslationIndex
Get:9 http://archive.ubuntu.com precise-updates/main i386 Packages [1046 kB]
Get:10 http://archive.ubuntu.com precise-updates/universe i386 Packages [284 kB]
Hit http://archive.ubuntu.com precise-updates/main TranslationIndex            
Hit http://archive.ubuntu.com precise-updates/universe TranslationIndex
Hit http://archive.ubuntu.com precise/main Translation-en
Hit http://archive.ubuntu.com precise/universe Translation-en
Hit http://archive.ubuntu.com precise-updates/main Translation-en         
Hit http://archive.ubuntu.com precise-updates/universe Translation-en     
Fetched 2351 kB in 5s (416 kB/s)                                          
Reading package lists... Done
**W: GPG error: http://repo.saltstack.com precise Release: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 0E08A149DE57BFBE**

来源列表内容:

deb  http://archive.ubuntu.com/ubuntu precise main
deb  http://archive.ubuntu.com/ubuntu precise-updates main
deb  http://security.ubuntu.com/ubuntu precise-security main
deb  http://archive.ubuntu.com/ubuntu precise universe
deb  http://archive.ubuntu.com/ubuntu precise-updates universe

/etc/apt/sources.list.d/saltstack.list:

deb http://repo.saltstack.com/apt/ubuntu/12.04/amd64/latest precise main

你知道我该如何解决这个问题吗?

由于

2 个答案:

答案 0 :(得分:3)

  1. 运行sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E08A149DE57BFBE
  2. 然后sudo apt-get update

答案 1 :(得分:0)

第一种方式:

尝试添加缺失密钥:

     sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E08A149DE57BFBE

然后更新:

     sudo apt-get update

第二种方式:

如果是无用的软件包,请尝试从/etc/apt/sources.list和此文件夹中删除:

  

cd /etc/apt/sources.list.d