Ask Your Question
0

How to install java on node using puppet-java

asked 2014-07-21 03:55:39 -0500

Rajesh Taneja gravatar image

I am new to puppet and trying to install java on puppet node, using puppet-java and getting following error

Error: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install java' returned 100:

Reading package lists...

Building dependency tree...

Reading state information...

E: Unable to locate package java

Wrapped exception:

Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install java' returned 100: Reading package lists...

Building dependency tree...

Reading state information...

E: Unable to locate package java

Error: /Stage[main]/Java/Package[java]/ensure: change from purged to latest failed: Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold install java' returned 100: Reading package lists...

Building dependency tree...

Reading state information...

E: Unable to locate package java

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-07-22 02:32:47 -0500

Hi Rajesh,

This looks like Debian, Ubuntu, or a derivative and it's trying to install a package called just "java". I don't have access to a Debian-based box right now, but I don't think that's the right package name. How are you declaring the java class? Are you passing any parameters to it (like 'package')?

This is what the defaults look like to give you an idea:

https://github.com/puppetlabs/puppetl...

edit flag offensive delete link more

Comments

Thanks for the reply Josh, Yeah, it is a problem with package. I was not passing any parameter, but was expecting it to automatically install open jdk on Debian. I was using class { 'java': distribution => 'jdk', version => 'latest', } Now I am using biemond-jdk7 and it worked well for me.

Rajesh Taneja gravatar imageRajesh Taneja ( 2014-07-22 02:55:06 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-07-21 03:54:30 -0500

Seen: 309 times

Last updated: Jul 22 '14