Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9245537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T09:17:18+00:00 2026-06-18T09:17:18+00:00

I’m trying to figure out how Chef and Vagrant work by creating a LAMP

  • 0

I’m trying to figure out how Chef and Vagrant work by creating a LAMP stack in a Centos box.
When provisioning with Chef, the Apache2 install gives the following error:

[2013-02-01T11:00:13+00:00] INFO: package[apache2] installing httpd-2.2.15-15.el6.centos.1 from base repository

================================================================================

Error executing action `install` on resource 'package[apache2]'

================================================================================


Chef::Exceptions::Exec

----------------------

 returned 1, expected 0


Resource Declaration:

---------------------

# In /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb

 20: package "apache2" do
 21:   package_name node['apache']['package']
 22: end
 23: 

Compiled Resource:

------------------

# Declared in /tmp/vagrant-chef-1/chef-solo-1/cookbooks/apache2/recipes/default.rb:20:in `from_file'

package("apache2") do
  package_name "httpd"
  retries 0
  recipe_name "default"
  cookbook_name :apache2
  version "2.2.15-15.el6.centos.1"
  action :install
  retry_delay 2
end

[2013-02-01T11:00:56+00:00] ERROR: Running exception handlers
[2013-02-01T11:00:56+00:00] ERROR: Exception handlers complete
[2013-02-01T11:00:56+00:00] FATAL: Stacktrace dumped to /tmp/vagrant-chef-1/chef-stacktrace.out
[2013-02-01T11:00:56+00:00] FATAL: Chef::Exceptions::Exec: package[apache2] (apache2::default line 20) had an error: Chef::Exceptions::Exec:  returned 1, expected 0
Chef never successfully completed! Any errors should be visible in the
output above. Please fix your recipes so that they properly complete.

I commented out the Apache2 recipe and tried to install just PHP, but that gives the same error. The MYSQL recipe however works without problems and installs just fine

The base box was created with Veewee CentOS-6.3-i386-minimal and this is the recipe I use:

include_recipe "yum"
include_recipe "apache2"
include_recipe "apache2::mod_php5"
include_recipe "apache2::mod_rewrite"
include_recipe "php"
include_recipe "php::module_mysql"
include_recipe "mysql::server"

All used cookbooks are the latest from opscode-cookbooks.
I’ve no clue how to solve this, is it an error with yum not finding the packages, or some faulty install code in de cookbooks?

A previously installed Debian box with the same cookbooks (Apt instead of Yum) worked without problems.

Any help is appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T09:17:19+00:00Added an answer on June 18, 2026 at 9:17 am

    Thanks to @DracoAter for the life-saving advice.

    Ssh`d into vagrant and tried to install the package manually with yum.
    That gave the following error:

    error: unpacking of archive failed on file /var/www/icons/poweredby.png;510bc31b: cpio: symlink
    

    I had this in my Vagrantfile:

    config.vm.share_folder "www", "/var/www", "./www"
    

    Which apparently blocks access to that directory from yum. So removing that line fixes the installation of httpd.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has
I am trying to find ID3V2 tags from MP3 file using jid3lib in Java.
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I'm trying to select an H1 element which is the second-child in its group

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.