首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用Chef's apt食谱获得钥匙

如何使用Chef's apt食谱获得钥匙
EN

Stack Overflow用户
提问于 2014-07-03 00:59:37
回答 1查看 921关注 0票数 0

我在12.04的Ubuntu上运行,Vagrant使用Chef Solo。

PPA存储库:https://launchpad.net/~chris-lea/+archive/postgresql-9.3 The apt coookbook:https://github.com/opscode-cookbooks/apt

这是我食谱中值得关注的部分。

代码语言:javascript
复制
apt_repository 'postgresql-9.3' do
  uri          'http://ppa.launchpad.net/chris-lea/postgresql-9.3/ubuntu'
  distribution 'precise'
  components   ['main']
  keyserver    'keyserver.ubuntu.com'
  key          'D878D6C2'
  deb_src      true
end

execute 'apt-key-update' do
  command 'sudo apt-key update'
end

execute 'apt-update' do
  command 'sudo apt-get update --fix-missing'
end

package 'zsh' do
  action :install
end

package 'postgresql-9.3' do
  action :install
end

下面是错误:

代码语言:javascript
复制
==> default: [2014-07-02T15:23:52+00:00] INFO: Running queued delayed notifications before re-raising exception
==> default: [2014-07-02T15:23:52+00:00] ERROR: Running exception handlers
==> default: [2014-07-02T15:23:52+00:00] ERROR: Exception handlers complete
==> default: [2014-07-02T15:23:52+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: [2014-07-02T15:23:52+00:00] ERROR: package[postgresql-9.3] (dotabay::default line 22) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '100'
==> default: ---- Begin output of apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 ----
==> default: STDOUT: Reading package lists...
==> default: Building dependency tree...
==> default: Reading state information...
==> default: The following extra packages will be installed:
==> default:   libpq5 postgresql-client-9.3 postgresql-client-common postgresql-common
==> default:   ssl-cert
==> default: Suggested packages:
==> default:   oidentd ident-server locales-all postgresql-doc-9.3 openssl-blacklist
==> default: The following NEW packages will be installed:
==> default:   libpq5 postgresql-9.3 postgresql-client-9.3 postgresql-client-common
==> default:   postgresql-common ssl-cert
==> default: 0 upgraded, 6 newly installed, 0 to remove and 167 not upgraded.
==> default: Need to get 4,804 kB of archives.
==> default: After this operation, 23.1 MB of additional disk space will be used.
==> default: WARNING: The following packages cannot be authenticated!
==> default:   libpq5 postgresql-client-common postgresql-client-9.3 postgresql-common
==> default:   postgresql-9.3
==> default: STDERR: E: There are problems and -y was used without --force-yes
==> default: ---- End output of apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 ----
==> default: Ran apt-get -q -y install postgresql-9.3=9.3.3-1chl1~precise1 returned 100
==> default: [2014-07-02T15:23:52+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

Vagrantfile

代码语言:javascript
复制
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vm.box = "hashicorp/precise64"
  config.vm.network "forwarded_port", guest: 80, host: 8080
  config.omnibus.chef_version = :latest
  config.vm.provision "chef_solo" do |chef|
    chef.cookbooks_path = ["chef/cookbooks"]
    chef.add_recipe 'apt'
    chef.add_recipe 'dotabay'
  end
end
EN

回答 1

Stack Overflow用户

发布于 2014-07-03 07:21:47

看看https://launchpad.net/~chris-lea/+archive/postgresql-9.3,你的签名密钥是错误的。应该是C7917B12

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24536921

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档