【发布时间】:2019-11-02 22:28:38
【问题描述】:
我正在尝试在 chef 中使用包管理器并安装 nginx 服务器,但每次我在客户端上运行烹饪书时,它只是在说
Recipe: nginx::default
* yum_package[nginx] action install[2017-03-11T06:16:01-05:00] INFO: Processing yum_package[nginx] action install (nginx::default line 11)
* No candidate version available for nginx
================================================================================
Error executing action `install` on resource 'yum_package[nginx]'
================================================================================
Chef::Exceptions::Package
-------------------------
No candidate version available for nginx
Resource Declaration:
---------------------
# In /var/chef/cache/cookbooks/nginx/recipes/default.rb
11: package "nginx" do
12: action :install
13: end
14:
Compiled Resource:
------------------
# Declared in /var/chef/cache/cookbooks/nginx/recipes/default.rb:11:in `from_file'
yum_package("nginx") do
package_name "nginx"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "nginx"
recipe_name "default"
flush_cache {:before=>false, :after=>false}
end
Platform:
---------
x86_64-linux
[2017-03-11T06:16:29-05:00] 信息:在重新引发异常之前运行排队的延迟通知
运行处理程序: [2017-03-11T06:16:29-05:00] 错误:运行异常处理程序 运行处理程序完成 [2017-03-11T06:16:29-05:00] 错误:异常处理程序完成 厨师客户端失败。 1 个资源在 05 分 44 秒内更新
甚至我尝试安装 epel-release 软件包,但被拒绝并出现类似错误。
知道如何使用 CHEF 配方安装 nginx。
我也尝试使用 yum_package 但安装失败
yum_package "nginx" do
action :install
end
谢谢
【问题讨论】:
标签: nginx chef-infra rhel7