Foreman installation on amazon ec2 instance

afriemann asked:

Hi there and thank you for reading,

I am currently in the process of setting up a puppet service for our ec2 instances and decided to give foreman a try (node certificate management and automatic passenger setup seems nice).

Unfortunately I’m running into difficulties with the installation. I’m on fresh a ‘Amazon Linux AMI x86_64 PV’:

[[email protected] ~]# uname -a
Linux hostname 3.10.35-43.137.amzn1.x86_64 #1 SMP Wed Apr 2 09:36:59 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

and tried the following:

sudo yum -y update
sudo yum -y install
sudo yum -y install foreman-installer

which results in this:

Error: Package: rubygem-foreman_api-0.1.11-1.el6.noarch (foreman)
       Requires: rubygem(rest-client) >= 1.6.1
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest

The suggestions seem useless (–skip-broken installs all dependencies but foreman/puppet).
I ended up here
and tried installing the repository (after removing the old one)

sudo yum -y remove epel-release
sudo yum -y install

now again, what I tried:

sudo -y update
sudo -y install foreman-installer

results in the same error.
Installation without previous update is possible (though yum will complain about Public keys) and results in the following error:

[[email protected] ~]$ foreman-installer
/usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- highline/import (LoadError)
        from /usr/share/ruby/vendor_ruby/2.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /usr/sbin/foreman-installer:3:in `<main>'

I had similar problems while trying to set up passenger and eventually surrendered. I assume this happens due to conflicting ruby version, so:

[[email protected] puppet]# ruby --version
ruby 2.0.0p451 (2014-02-24 revision 45167) [x86_64-linux]
[[email protected] puppet]# gem --version
[[email protected] puppet]# ls /usr/bin | grep ruby
[[email protected] puppet]# ls /usr/bin | grep gem

Did someone run into the same issues? How do I resolve this?

Thanks in advance and thank you for reading through all this!

My answer:

Packages for Red Hat Enterprise Linux and its clones are not compatible with Amazon Linux. You will need to find either a different way to install Foreman, or preferably a different Linux distribution (Amazon Linux has many issues which make it generally unsuitable for just about anything).

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.