无法使用 Vagrant 和 Chef Solo 在 Fedora/VirtualBox 上配置 RabbitMQ。错误:"erlang >= R13B-03 is needed by rabbitmq-server-3.4.3.1.noarch"

Unable to provision RabbitMQ on Fedora/VirtualBox using Vagrant and Chef Solo. ERR: "erlang >= R13B-03 is needed by rabbitmq-server-3.4.3.1.noarch"

我正在尝试将 RabbitMQ(最新版)配置到 Fedora 20 base box(VirtualBox 提供程序)上。

我的食谱是这样的:

config.vm.provision "chef_solo" do |chef|
   ...
   chef.add_recipe "rabbitmq"
   chef.add_recipe "rabbitmq::mgmt_console"
   ...
end

我的 metadata.rb 有:

depends 'rabbitmq', '~> 3.8.0'

我的 Berksfile 有:

source "https://supermarket.chef.io"

metadata

cookbook 'rabbitmq', '~> 3.8.0'

运行 "vagrant provision" 之后的错误是:

==> default: Running handlers:
==> default: [2015-01-26T16:21:20+00:00] ERROR: Running exception handlers
==> default: Running handlers complete
==> default: [2015-01-26T16:21:20+00:00] ERROR: Exception handlers complete
==> default: [2015-01-26T16:21:20+00:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
==> default: Chef Client failed. 31 resources updated in 178.337417046 seconds
==> default: [2015-01-26T16:21:20+00:00] ERROR: rpm_package[/var/chef/cache/rabbitmq-server-3.4.3-1.noarch.rpm] (rabbitmq::default line 112) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
==> default: ---- Begin output of rpm  -i /var/chef/cache/rabbitmq-server-3.4.3-1.noarch.rpm ----
==> default: STDOUT: 
==> default: STDERR: warning: /var/chef/cache/rabbitmq-server-3.4.3-1.noarch.rpm: Header V4 DSA/SHA1 Signature, key ID 056e8e56: NOKEY
==> default: error: Failed dependencies:
==> default:    erlang >= R13B-03 is needed by rabbitmq-server-3.4.3-1.noarch
==> default:    logrotate is needed by rabbitmq-server-3.4.3-1.noarch
==> default: ---- End output of rpm  -i /var/chef/cache/rabbitmq-server-3.4.3-1.noarch.rpm ----
==> default: Ran rpm  -i /var/chef/cache/rabbitmq-server-3.4.3-1.noarch.rpm returned 1
==> default: [2015-01-26T16:21:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

我一直假设我不需要在 metadata.rb 中将 erlang 声明为直接依赖项 - 因为它被引用为 rabbitmq cookbook 中的依赖项。我确实尝试过这样做,但结果相同。感谢您的帮助。

您正在尝试使用 rabbitmq.com 包进行安装,这需要一个名为 "erlang" 的包作为依赖项。要么将属性 node['erlang']['install_method'] 设置为 'esl' 以使用 Erlang 解决方案包,要么将 node['rabbitmq']['use_distro_version'] 设置为 true 以使用 RabbitMQ 的 Fedora 包。