Centos – SOLVED – Unable to install foreman-proxy on CentOS 6.9

centosforemanpuppetpuppet-foremanrubygems

Puppet

[root@ns1 ~]# puppet --version
4.10.1

Repositories (used Foreman 1.12 as the next versions are not supported in Centos 6)

[root@ns1 ~]# yum repolist enabled
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.nl.leaseweb.net
 * extras: repo.uk.bigstepcloud.com
 * remi: remi.mirror.wearetriple.com
 * remi-safe: remi.mirror.wearetriple.com
 * updates: repo.uk.bigstepcloud.com
repo id                                                                                          repo name                                                                                                                             status
base                                                                                             CentOS-6 - Base                                                                                                                        6,706
centos-sclo-rh                                                                                   CentOS-6 - SCLo rh                                                                                                                     5,553
centos-sclo-sclo                                                                                 CentOS-6 - SCLo sclo                                                                                                                     300
epel                                                                                             Extra Packages for Enterprise Linux 6 - x86_64                                                                                        12,309
extras                                                                                           CentOS-6 - Extras                                                                                                                         45
foreman                                                                                          Foreman 1.12                                                                                                                             460
foreman-plugins                                                                                  Foreman plugins 1.12                                                                                                                     240
percona-release-noarch                                                                           Percona-Release YUM repository - noarch                                                                                                   43
percona-release-x86_64                                                                           Percona-Release YUM repository - x86_64                                                                                                1,328
puppetlabs-deps                                                                                  Puppet Labs Dependencies El 6 - x86_64                                                                                                    77
puppetlabs-products                                                                              Puppet Labs Products El 6 - x86_64                                                                                                       565
remi                                                                                             Remi's RPM repository for Enterprise Linux 6 - x86_64                                                                                  4,190
remi-safe                                                                                        Safe Remi's RPM repository for Enterprise Linux 6 - x86_64                                                                             1,782
updates                                                                                          CentOS-6 - Updates                                                                                                                       354
repolist: 33,952

Foreman

[root@ns1 ~]# yum -y install foreman-installer

[root@ns1 ~]# foreman-installer
...
 Execution of '/usr/bin/yum -d 0 -e 0 -y install foreman-proxy' returned 1: Error: Package: foreman-proxy-1.12.4-1.el6.noarch (foreman)
 /Stage[main]/Foreman_proxy::Install/Package[foreman-proxy]/ensure: change from purged to present failed: Execution of '/usr/bin/yum -d 0 -e 0 -y install foreman-proxy' returned 1: Error: Package: foreman-proxy-1.12.4-1.el6.noarch (foreman)                                                                                                                                                                                                                                          
[FAILED]main]/Puppet::Server::Service/Service[puppetserver]: Failed to call refresh: Could not start Service[puppetserver]: Execution of '/sbin/service puppetserver start' returned 1: Starting puppetserver: [FAILED]
[FAILED]main]/Puppet::Server::Service/Service[puppetserver]: Could not start Service[puppetserver]: Execution of '/sbin/service puppetserver start' returned 1: Starting puppetserver: [FAILED]
...

foreman-proxy

[root@ns1 ~]# yum install foreman-proxy
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.nl.leaseweb.net
 * extras: repo.uk.bigstepcloud.com
 * remi: remi.mirror.wearetriple.com
 * remi-safe: remi.mirror.wearetriple.com
 * updates: repo.uk.bigstepcloud.com
Resolving Dependencies
--> Running transaction check
---> Package foreman-proxy.noarch 0:1.12.4-1.el6 will be installed
--> Processing Dependency: rubygem(sinatra) for package: foreman-proxy-1.12.4-1.el6.noarch
--> Finished Dependency Resolution
Error: Package: foreman-proxy-1.12.4-1.el6.noarch (foreman)
           Requires: rubygem(sinatra)
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

--skip-broken key does not help in this case

rubygem-sinatra

[root@ns1 ~]# yum install rubygem-sinatra
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: mirrors.coreix.net
 * epel: mirror.nl.leaseweb.net
 * extras: repo.uk.bigstepcloud.com
 * remi: remi.mirror.wearetriple.com
 * remi-safe: remi.mirror.wearetriple.com
 * updates: repo.uk.bigstepcloud.com
No package rubygem-sinatra available.
Error: Nothing to do

[root@ns1 ~]# gem install sinatra
ERROR:  Error installing sinatra:
        rack requires Ruby version >= 2.2.2.

Tried previous version:

[root@ns1 ~]# gem install sinatra -v 1.4.8
Successfully installed rack-1.6.8
Successfully installed rack-protection-1.5.3
Successfully installed sinatra-1.4.8
3 gems installed
Installing ri documentation for rack-1.6.8...
Installing ri documentation for rack-protection-1.5.3...
Installing ri documentation for sinatra-1.4.8...
Installing RDoc documentation for rack-1.6.8...
Installing RDoc documentation for rack-protection-1.5.3...
Installing RDoc documentation for sinatra-1.4.8...

However, foreman-proxy still cannot be installed due to the same error:

Error: Package: foreman-proxy-1.12.4-1.el6.noarch (foreman)
           Requires: rubygem(sinatra)

Best Answer