Chef:尝试运行Chef-Solo时出现奇怪的Erlang错误

时间:2011-06-21 06:20:27

标签: chef

尝试在我的Oracle Linux Box上安装Chef。完成以下说明,我到达以下地点:

运行chef-solo:

(在网址中): http://wiki.opscode.com/display/chef/Bootstrap+Chef+RubyGems+Installation

...我收到以下错误:

[root@chefmaster ~]# chef-solo -c /etc/chef/solo.rb -j ~/chef.json -r  http://s3.amazonaws.com/chef-solo/bootstrap-latest.tar.gz
[Mon, 20 Jun 2011 13:53:01 -0700] INFO: *** Chef 0.10.0 ***
[Mon, 20 Jun 2011 13:53:02 -0700] INFO: Setting the run_list to ["recipe[chef- server::rubygems-install]"] from JSON
[Mon, 20 Jun 2011 13:53:02 -0700] INFO: Run List is [recipe[chef-server::rubygems-install]]
[Mon, 20 Jun 2011 13:53:02 -0700] INFO: Run List expands to [chef-server::rubygems-install]
[Mon, 20 Jun 2011 13:53:02 -0700] INFO: Starting Chef Run for localhost
[Mon, 20 Jun 2011 13:53:03 -0700] INFO: Processing user[chef] action create (chef-server::rubygems-install line 30)
[Mon, 20 Jun 2011 13:53:03 -0700] INFO: Processing package[erlang] action install (erlang::default line 26)
[Mon, 20 Jun 2011 13:53:04 -0700] ERROR: package[erlang] (erlang::default line 26) has had an error
[Mon, 20 Jun 2011 13:53:04 -0700] ERROR: Running exception handlers
[Mon, 20 Jun 2011 13:53:04 -0700] ERROR: Exception handlers complete
[Mon, 20 Jun 2011 13:53:04 -0700] FATAL: Stacktrace dumped to /tmp/chef-solo/chef-stacktrace.out
[Mon, 20 Jun 2011 13:53:04 -0700] FATAL: Chef::Exceptions::Package: package[erlang] (erlang::default line 26) had an error: No version specified, and no candidate version available for erlang

我检查了谷歌,他们提到了一个过时的链接,通过RPM,这是几年前的RPM。我安装了erlang:

[root @ chef~]#erl --version Erlang R14B03(erts-5.8.4)[source] [64-bit] [rq:1] [async-threads:0] [hipe] [kernel-poll:false]

欢迎任何想法

2 个答案:

答案 0 :(得分:3)

我也有这个问题。问题是与centos一起提供的默认yum存储库(我假设你已经开启)不包括沙发。您必须像这样添加epel yum存储库:

rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/i386/epel-release-5-4.noarch.rpm

这样做之后,一切都应该顺利进行。

答案 1 :(得分:0)

以上对CentOS 5.x起作用不起作用了。

在/etc/yum.conf中,我不得不改变......

reposdir=/etc/false

...到......

reposdir=/etc/yum.repos.d/