在资源'yum_package [g ++]'上执行动作`install`时出错

时间:2016-12-16 14:28:23

标签: chef cookbook

我正在尝试使用已配置的厨师食谱启动实例,但我收到此错误:

================================================================================
Error executing action `install` on resource 'yum_package[g++]'
================================================================================

Chef::Exceptions::Package
-------------------------
No candidate version available for g++

Resource Declaration:
---------------------
# In /var/chef/runs/1bb2ddbe-8793-4eef-b5c8-4bbfccc7dcf6/local-mode-cache/cache/cookbooks/cassandra-php-driver-cookbook/recipes/setup.rb

4:     package pkg do
5:         :install
6:     end
7: end

Compiled Resource:
------------------
# Declared in /var/chef/runs/1bb2ddbe-8793-4eef-b5c8-4bbfccc7dcf6/local-mode-cache/cache/cookbooks/cassandra-php-driver-cookbook/recipes/setup.rb:4:in `block in from_file'

yum_package("g++") do
package_name "g++"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "cassandra-php-driver-cookbook"
recipe_name "setup"
flush_cache {:before=>false, :after=>false}
end

Platform:
---------
x86_64-linux

[2016-12-16T14:23:21+00:00] INFO: Running queued delayed notifications before re-raising exception
[2016-12-16T14:23:21+00:00] ERROR: Running exception handlers
[2016-12-16T14:23:21+00:00] ERROR: Exception handlers complete
[2016-12-16T14:23:21+00:00] FATAL: Stacktrace dumped to /var/chef/runs/1bb2ddbe-8793-4eef-b5c8-4bbfccc7dcf6/local-mode-cache/cache/chef-stacktrace.out
[2016-12-16T14:23:21+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2016-12-16T14:23:21+00:00] ERROR: yum_package[g++] (cassandra-php-driver-cookbook::setup line 4) had an error: Chef::Exceptions::Package: No candidate version available for g++
[2016-12-16T14:23:21+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)

在我的食谱中,我有一个名为cassandra-php-driver的目录,它有属性文件夹,我有文件default.rb,我把所有的软件包都安装好了。 有人可以帮忙吗?

1 个答案:

答案 0 :(得分:1)

根据上述评论总结,您无法在基于Debian的计算机上使用('iphone', 'something')。一般情况下,除非您需要其中一项功能,否则请勿直接使用yum_packageyum_package,只需使用apt_package