# Issue running tomcat cookbook on Ubuntu

**URL:** <https://discourse.chef.io/t/issue-running-tomcat-cookbook-on-ubuntu/4433>\
**Category:** Chef Infra (archive)\
**Created:** [September 10, 2013, 9:08pm UTC](https://discourse.chef.io/t/issue-running-tomcat-cookbook-on-ubuntu/4433 "2013-09-10T21:08:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ricardo\_Mayerhofer](https://avatars.discourse-cdn.com/v4/letter/r/c57346/32.png) [@Ricardo\_Mayerhofer](https://discourse.chef.io/u/Ricardo_Mayerhofer)\
**Post date:** [September 10, 2013, 9:08pm UTC](https://discourse.chef.io/t/issue-running-tomcat-cookbook-on-ubuntu/4433/1 "2013-09-10T21:08:16Z")

</div>

Hi all,  
I’m trying to run the tomcat cookbook (  
[http://community.opscode.com/cookbooks/tomcat](http://community.opscode.com/cookbooks/tomcat)) on an Ubuntu box, but I’m  
getting the following error:

# 162.209.81.190 Recipe: java::openjdk←[0m 162.209.81.190 162.209.81.190 \* bash[update-java-alternatives] action nothing←[0m 162.209.81.190 (skipped due to action :nothing)←[0m 162.209.81.190 162.209.81.190 \* package[openjdk-6-jdk] action install←[0m 162.209.81.190 ←[0m 162.209.81.190 162.209.81.190

# ===============←[0m 162.209.81.190 162.209.81.190 ←[31mError executing action `install` on resource ’package[openjdk-6-jdk]'←[0m 162.209.81.190 162.209.81.190

===============←[0m  
162.209.81.190  
162.209.81.190  
162.209.81.190 ←[0m  
162.209.81.190  
162.209.81.190 Chef::Exceptions::Exec←[0m  
162.209.81.190  
162.209.81.190 ----------------------←[0m  
162.209.81.190  
162.209.81.190 apt-get -q -y install  
openjdk-6-jdk=6b27-1.12.5-0ubuntu0.12.04.1 returned 100, expected 0←[0m  
162.209.81.190  
162.209.81.190  
162.209.81.190 ←[0m

Any suggestion on how to fix it?

Thanks,

–  
Ricardo Mayerhofer

---

<div class="post-metadata">

**Author:** ![Michael\_Goetz1](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/michael_goetz1/32/486_2.png) [@Michael\_Goetz1](https://discourse.chef.io/u/Michael_Goetz1)\
**Post date:** [September 10, 2013, 9:11pm UTC](https://discourse.chef.io/t/issue-running-tomcat-cookbook-on-ubuntu/4433/2 "2013-09-10T21:11:11Z")

</div>

My first guess would be your apt-cache is out of date possibly? Try running an apt-get update and then re-run chef-client to validate. If that solves it, you can put an apt-get update in your recipe or include the apt cookbook (which I believe does this by default) in your run list.

Michael Goetz — Automation Consulting Engineer  
651-271-7121 – [mpgoetz@opscode.com](mailto:mpgoetz@opscode.com) – my: Linkedin Twitter

OPSCODE  
CODE CAN  
[opscode.com](http://opscode.com) Blog Facebook Twitter YouTube

On September 10, 2013 at 4:08:32 PM, Ricardo Mayerhofer ([ricardo.ekm@gmail.com](mailto:ricardo.ekm@gmail.com)) wrote:

Hi all,  
I’m trying to run the tomcat cookbook ([http://community.opscode.com/cookbooks/tomcat](http://community.opscode.com/cookbooks/tomcat)) on an Ubuntu box, but I’m getting the following error:

162.209.81.190 Recipe: java::openjdk←[0m  
162.209.81.190  
162.209.81.190 \* bash[update-java-alternatives] action nothing←[0m  
162.209.81.190 (skipped due to action :nothing)←[0m  
162.209.81.190  
162.209.81.190 \* package[openjdk-6-jdk] action install←[0m  
162.209.81.190 ←[0m  
162.209.81.190  
162.209.81.190 =================================================================  
===============←[0m  
162.209.81.190  
162.209.81.190 ←[31mError executing action `install` on resource 'package[openjdk-6-jdk]'←[0m  
162.209.81.190  
162.209.81.190 =================================================================  
===============←[0m  
162.209.81.190  
162.209.81.190  
162.209.81.190 ←[0m  
162.209.81.190  
162.209.81.190 Chef::Exceptions::Exec←[0m  
162.209.81.190  
162.209.81.190 ----------------------←[0m  
162.209.81.190  
162.209.81.190 apt-get -q -y install openjdk-6-jdk=6b27-1.12.5-0ubuntu0.12.04.1 returned 100, expected 0←[0m  
162.209.81.190  
162.209.81.190  
162.209.81.190 ←[0m

Any suggestion on how to fix it?

Thanks,

–  
Ricardo Mayerhofer
