I was following the chef tutorial. My workstation is Ubuntu. At the step 'Install the Apache package'
.
I wrote a recipe which contains only "package 'httpd'"
. I was supposed to install Apache after that. However, I got an error:
Error executing action `install` on resource 'apt_package[httpd]'
================================================================================
Chef::Exceptions::Package
-------------------------
httpd is a virtual package provided by multiple packages, you must explicitly select one
Resource Declaration:
---------------------
# In /home/local/ANT/yuqiw/chef-repo/webserver.rb
2: apt_package("httpd")
Compiled Resource:
------------------
# Declared in /home/local/ANT/yuqiw/chef-repo/webserver.rb:2:in `from_file'
apt_package("httpd") do
package_name "httpd"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :apt_package
cookbook_name "@recipe_files"
recipe_name "/home/local/ANT/yuqiw/chef-repo/webserver.rb"
end
Platform:
---------
x86_64-linux
Can anyone help me out?
The package called httpd
on RHEL/CentOS/Fedora is called apache2
in Debian/Ubuntu. At the start of the tutorial you had to pick if you were using Ubuntu or CentOS, you probably picked the incorrect one. Just go back to that screen and click the other link.
service 'apache2' do
action :install
end
Try to use it further in the tutorial.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With