# Unable to install apache2 on CentOS 6.2

**URL:** <https://discourse.chef.io/t/unable-to-install-apache2-on-centos-6-2/5113>\
**Category:** Chef Infra (archive)\
**Created:** [March 14, 2014, 6:43am UTC](https://discourse.chef.io/t/unable-to-install-apache2-on-centos-6-2/5113 "2014-03-14T06:43:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AniketSharad](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/aniketsharad/32/337_2.png) [@AniketSharad](https://discourse.chef.io/u/AniketSharad)\
**Post date:** [March 14, 2014, 6:43am UTC](https://discourse.chef.io/t/unable-to-install-apache2-on-centos-6-2/5113/1 "2014-03-14T06:43:45Z")

</div>

Ohai chefs

I am getting the below error while installing apache2 package on CenOS 6.2; the yum info command returns the packate and its version; when I used package resource in my recipe to install; it fails to install apache with the below error.  
Has anyone see this, is there a bug?

Any pointers would be helpful!

Thanks  
Aniket

[2014-03-13T23:37:31-07:00] DEBUG: package[apache2] checking yum info for httpd-2.2.15  
[2014-03-13T23:37:31-07:00] DEBUG: package[apache2] installed version: (none) candidate version: 2.2.15-15.el6.centos

# ================================================================================ Error executing action `install` on resource ‘package[apache2]’

## Chef::Exceptions::Package

Version 2.2.15 of httpd not found. Did you specify both version and release? (version-release, e.g. 1.84-10.fc6)

## Resource Declaration:

# In /var/chef/cache/cookbooks/CQ-Author-Install/recipes/dispatcher.rb

1: package ‘apache2’ do  
2: package\_name node[‘apache’][‘package’]  
3: version node[‘apache’][‘version’]  
4: end  
5:

---

<div class="post-metadata">

**Author:** ![jdunn](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/jdunn/32/1800_2.png) [@jdunn](https://discourse.chef.io/u/jdunn)\
**Post date:** [March 17, 2014, 9:43pm UTC](https://discourse.chef.io/t/unable-to-install-apache2-on-centos-6-2/5113/2 "2014-03-17T21:43:32Z")

</div>

What is node['apache']['version'] set to?

As the error says, you have to specify the full version-release (e.g.  
2.2.15-15.el6)

- Julian

On Fri, Mar 14, 2014 at 2:43 AM, Aniket Sharad [asharad@adobe.com](mailto:asharad@adobe.com) wrote:

> Ohai chefs
> 
> I am getting the below error while installing apache2 package on CenOS 6.2;  
> the yum info command returns the packate and its version; when I used  
> package resource in my recipe to install; it fails to install apache with  
> the below error.
> 
> Has anyone see this, is there a bug?
> 
> Any pointers would be helpful!
> 
> Thanks
> 
> Aniket
> 
> [2014-03-13T23:37:31-07:00] DEBUG: package[apache2] checking yum info for  
> httpd-2.2.15
> 
> [2014-03-13T23:37:31-07:00] DEBUG: package[apache2] installed version:  
> (none) candidate version: 2.2.15-15.el6.centos
> 
> ================================================================================
> 
> Error executing action `install` on resource 'package[apache2]'
> 
> ================================================================================
> 
> Chef::Exceptions::Package
> 
> * * *
> 
> Version 2.2.15 of httpd not found. Did you specify both version and release?  
> (version-release, e.g. 1.84-10.fc6)
> 
> Resource Declaration:
> 
> * * *
> 
> # In /var/chef/cache/cookbooks/CQ-Author-Install/recipes/dispatcher.rb
> 
> 1: package 'apache2' do
> 
> 2: package\_name node['apache']['package']
> 
> 3: version node['apache']['version']
> 
> 4: end
> 
> 5:

--  
[Julian C. Dunn [jdunn@aquezada.com](mailto:jdunn@aquezada.com) \* Sorry, I'm ]  
[WWW: [http://www.aquezada.com/staff/julian](http://www.aquezada.com/staff/julian) \* only Web 1.0 ]  
[gopher://sdf.org/1/users/keymaker/ \* compliant!]  
[PGP: 91B3 7A9D 683C 7C16 715F 442C 6065 D533 FDC2 05B9]
