Ask Your Question
0

How do I use the java module from forge to install a specific version of java?

asked 2015-11-13 16:10:46 -0500

catpants gravatar image

Hi folks,

Trying to use the java module from forge to install a specific version of the jre. I have tried:

class { 'java':          
  distribution => 'jre', 
  version => '1.6.0', 
}

this:

class { 'java':          
  distribution => 'jre', 
  version => '1.6', 
}

and this:

class { 'java':          
  distribution => 'jre', 
  version => '6', 
}

All with no luck. The error I get always looks like:

Could not update: Execution of '/usr/bin/apt-get -q -y -o DPkg::Options::=--force-confold --force-yes install openjdk-7-jre-headless=1.6.0' returned 100:

This module is listed as "supported" by puppet labs, so I would imagine this is supposed to work out of the box.

Thanks!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-11-13 19:05:09 -0500

lavaman gravatar image

That module simply uses your OS package management to install the java package. Does openjdk-7-jre-headless actually exist in your apt repos at the version you are attempting to install?

If not, you need to make them available.

edit flag offensive delete link more

Comments

This is explained in more detail in the module's "Limitations" section: https://forge.puppetlabs.com/puppetlabs/java#limitations.

aharden gravatar imageaharden ( 2015-11-16 09:25:22 -0500 )edit

If I'm trying to install version 6 of the jre, wouldn't I be looking for "openjdk-6-jre-headless"? Yes, "openjdk-6-jre-headless" exists in my apt repos.

catpants gravatar imagecatpants ( 2015-11-16 12:00:01 -0500 )edit

I was just going off the output you listed above. Apt is attempting to install openjdk-7. Also, you can always run the command puppet is executing to see why it is failing.

lavaman gravatar imagelavaman ( 2015-11-18 16:19:48 -0500 )edit
0

answered 2015-11-17 01:11:06 -0500

try this class {'java': package => 'java-1.8.0-openjdk.x86_64', distribution => 'jre', }

edit flag offensive delete link more

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-11-13 16:10:46 -0500

Seen: 166 times

Last updated: Nov 13 '15