我正在學習廚師,並且在嘗試安裝httpd軟件包時卡在這裏。我有一個簡單的配方在Mac OS上安裝httpd軟件包。我安裝了ChefDK。廚師:沒有可用的名稱爲「httpd」的公式
webserver.rb
package 'httpd'
當我運行chef-apply webserver.rb
,它拋出的錯誤:
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
Expected process to exit with [0], but received '1'
---- Begin output of brew info --json=v1 httpd ----
STDOUT:
STDERR: Error: No available formula with the name "httpd"
---- End output of brew info --json=v1 httpd ----
Ran brew info --json=v1 httpd returned 1
Resource Declaration:
---------------------
# In webserver.rb
1: package 'httpd'
Compiled Resource:
------------------
# Declared in webserver.rb:1:in `run_chef_recipe'
homebrew_package("httpd") do
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
package_name "httpd"
declared_type :package
cookbook_name "(chef-apply cookbook)"
recipe_name "(chef-apply recipe)"
end
有人能告訴我什麼,我錯過了這裏。謝謝。
謝謝@coderanger,廚師教程不清楚。我認爲這是抽象的所有平臺。 – imechemi
抽象級別只是使用哪個底層包系統,而不是一般包的名稱/用法。有一個可以使用的'httpd'社區菜譜,它提供了一個更完整的抽象,用於「在我的系統上安裝Apache2」。 – coderanger