- From: <
>
- To:
- Subject: [chef] JDK RPM Install Error
- Date: Wed, 25 Jan 2012 14:07:10 -0800 (PST)
I have written a simple cookbook to install Sun's JDK via RPM. Once in a while
I get support questions about it failing during the install process of the
package.
The error is,
{
FATAL: Chef::Exceptions::Exec: package[jdk-6u23-linux-x64.rpm]
(sun_java::default line 23) had an error: yum -d0 -e0 -y --nogpgcheck
localinstall /var/cache/chef/jdk-6u23-linux-x64.rpm returned 1, expected 0
}
When they run the command they see,
{
yum -d0 -e0 -y --nogpgcheck localinstall
/var/cache/chef/jdk-6u23-linux-x64.rpm
This system is not registered with RHN.
RHN support will be disabled.
Transaction Check Error:
package jdk-1.6.0_23-fcs.x86_64 is already installed
}
Which is actually the same exact package they are trying to install. I am
guessing this is an issue with the build/packaging of the rpms being
different.
Has anyone seen this or have any ideas how to fix/avoid this? The easiest
option I could think of is to add a 'not_if' option to the package and to grep
the output of 'java -version' for the correct version, but I don't like that
idea since the package resource should handle it.
Here is the resource in question,
{
package javaRPM do
action :install
source "#{Chef::Config[:file_cache_path]}/#{javaRPM}"
options "--nogpgcheck" # sun/oracle doesn't sign their RPMs o_O
notifies :run, "bash[update-alternatives java]", :immediately
end
}
- [chef] JDK RPM Install Error, bjbq4d, 01/25/2012
Archive powered by MHonArc 2.6.16.