Ask Your Question
0

yum returns error code 1 all the time

asked 2015-11-06 14:43:06 -0500

drm509 gravatar image

I have a puppet module where I download files and install them with yum. I can download fine, just can't install them.

exec{'download_lumberjack':
    command => "wget http://repos/artifactory/com/elasticsearch/logstash-forwarder/0.4.0-centOS7/logstash-forwarder-0.4.0-centOS7-1.x86_64.rpm",
    cwd => "/",
    path => ["/usr/bin"],
    logoutput => true,
  }
  exec{'install_lumberjack':
    command => "yum install -y logstash-forwarder-0.4.0-centOS7-1.x86_64.rpm",
    cwd => "/",
    path => ["/usr/bin"],
    logoutput => true,
  }

Error: yum install -y logstash-forwarder-0.4.0-centOS7-1.x86_64.rpm returned 1 instead of one of [0]
Error: /Stage[main]/LSF::Install/Exec[install_Java]/returns: change from notrun to 0 failed: yum install -y logstash-forwarder-0.4.0-centOS7-1.x86_64.rpm returned 1 instead of one of [0]
Error: Could not find command 'yum'

What the heck?

edit retag flag offensive close merge delete

Comments

2

what happen if you trigger it manually? Seems that yum can't find it. Try yum localinstall -y /absolutepath/<logstash>.rpm

lupin gravatar imagelupin ( 2015-11-06 16:00:30 -0500 )edit

@lupin that made it work; thanks

drm509 gravatar imagedrm509 ( 2015-11-09 08:45:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-11-07 06:23:04 -0500

Says could not find command yum..

I'd you type which yum what path does it give you?

Instead of typing yum in the exec could you try typing the full path?

edit flag offensive delete link more

Comments

weird, it doesn't recognize command (weird!) which when I do which yum, but doing locainstall made it work!

drm509 gravatar imagedrm509 ( 2015-11-09 08:44:55 -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

Stats

Asked: 2015-11-06 14:43:06 -0500

Seen: 419 times

Last updated: Nov 07 '15