Назад | Перейти на главную страницу

РЕШЕНО - Невозможно установить foreman-proxy на CentOS 6.9

Кукольный

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

Репозитории (использовался Foreman 1.12, поскольку следующие версии не поддерживаются в 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

мастер

[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]
...

бригадир-доверенное лицо

[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...

Однако по-прежнему не удается установить foreman-proxy из-за той же ошибки:

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

При попытке установить foreman-proxy с участием yum он не знает о вашем gem пакеты. Работает только с rpm база данных. Итак, вы должны установить rubygem-sinatra по yum, rubygem-sinatra может быть расположен в epel репо. Вы можете установить его командой yum install epel-release. И после этого запустить yum install rubygem-sinatra

Я нашел его там по команде:

[root@~ ]# yum provides rubygem-sinatra
1:rubygem-sinatra-1.4.8-2.el7.noarch : Ruby-based web application framework 
Repo        : epel

Мой ответ протестирован в CentOS 7.

Обновить

Для CentOS 6 вы можете попробовать установить RPM из этот сайт sudo rpm -i https://driesrpms.eu/redhat/el6/en/x86_64/dries.all/RPMS/rubygem-sinatra-1.1.3-1.el6.rf.noarch.rpm --nodeps

Вы можете скачать Sinatra rpm из http://www.rpmseek.com/rpm-pl/rubygem-sinatra.html?hl=com&cs=rubygems:RE:0:0:0:0:800 и установите его.