Ask Your Question

how to install package on red hat 6.2

asked 2015-03-12 10:12:54 -0600

akshay gravatar image

updated 2015-03-12 11:27:47 -0600

ramindk gravatar image
class  oracle {

  define oracle_packages {

    file { "/home/oracle_pkg/${name}":
      ensure => present,
      source => "puppet:///modules/oracle/${name}",
      notify => Package[$name],

    package { $name:
      ensure          => present,
      provider         => 'rpm',
      allow_virtual    => false,
      source           => "/home/oracle_pkg/${name}",
      require          => File["/home/oracle_pkg/${name}"],
      install_options  => ["rpm -ivh --force=/home/oracle_pkg/"],

   oracle_packages { 'binutils-': }
   oracle_packages { 'compat-libcap1-1.10-1.x86_64.rpm': }

    exec { 'rpm -ivh --force':
      command => "rpm -ivh --force ",
      path    => ["/home/oracle_pkg/"],

I m try to install the oracle package on agent machine but it gives me an error. Error is : Could not find 'rpm'. So what are the option for installing the packages on red hat machine? So what is the mistake in my code? Please help me.

edit retag flag offensive close merge delete


Please help me

akshay gravatar imageakshay ( 2015-03-12 10:29:31 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-03-13 05:19:38 -0600

I'd suggest firstly adding the packages to a yum repo - easier to manage, also sorts dependencies etc - also easier to handle in puppet.

if you dont want to do that then try changing

command => "rpm ..."


command => "/bin/rpm ..."

Cheers Stuart

edit flag offensive delete link more


I was trying this but it gives me an error. So please send a demo code to install multiple package on red hat machine successfully. I m try to install the oracle packages. So please send me a demo code that have the dependency. So how to write the code for rpm packages?

akshay gravatar imageakshay ( 2015-03-13 08:51:34 -0600 )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


Asked: 2015-03-12 10:12:54 -0600

Seen: 208 times

Last updated: Mar 13 '15