24 January 2015

Resolving issue installing Puppet automation on RHEL 6.5 via Yum

If you are decided to install Puppet for Linux automation for your network, you may encounter an issue same as what I encountered as describe below.

While installing Puppet via yum method, I ran into following dependency error:

# yum install puppet-server
Loaded plugins: product-id, security, subscription-manager
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package puppet-server.noarch 0:3.8.1-1.el6 will be installed
--> Processing Dependency: puppet = 3.8.1-1.el6 for package: puppet-server-3.8.1-1.el6.noarch
--> Running transaction check
---> Package puppet.noarch 0:3.8.1-1.el6 will be installed
--> Processing Dependency: hiera >= 1.0.0 for package: puppet-3.8.1-1.el6.noarch
--> Processing Dependency: facter >= 1:1.7.0 for package: puppet-3.8.1-1.el6.noarch
--> Processing Dependency: ruby-augeas for package: puppet-3.8.1-1.el6.noarch
--> Processing Dependency: ruby-shadow for package: puppet-3.8.1-1.el6.noarch
--> Processing Dependency: rubygem-json for package: puppet-3.8.1-1.el6.noarch
--> Processing Dependency: ruby(selinux) for package: puppet-3.8.1-1.el6.noarch
--> Running transaction check
---> Package facter.x86_64 1:2.4.4-1.el6 will be installed
---> Package hiera.noarch 0:1.3.4-1.el6 will be installed
---> Package libselinux-ruby.x86_64 0:2.0.94-5.3.el6_4.1 will be installed
---> Package ruby-augeas.x86_64 0:0.4.1-3.el6 will be installed
--> Processing Dependency: augeas-libs >= 0.8.0 for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.10.0)(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.1.0)(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.11.0)(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.8.0)(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0(AUGEAS_0.12.0)(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
--> Processing Dependency: libaugeas.so.0()(64bit) for package: ruby-augeas-0.4.1-3.el6.x86_64
---> Package ruby-shadow.x86_64 1:2.2.0-2.el6 will be installed
---> Package rubygem-json.x86_64 0:1.5.5-3.el6 will be installed
--> Processing Dependency: rubygems >= 1.3.7 for package: rubygem-json-1.5.5-3.el6.x86_64
--> Running transaction check
---> Package augeas-libs.x86_64 0:1.0.0-5.el6 will be installed
---> Package rubygems.noarch 0:2.0.14-24.el7 will be installed
--> Processing Dependency: rubygem(rdoc) >= 4.0.0 for package: rubygems-2.0.14-24.el7.noarch
--> Processing Dependency: rubygem(psych) >= 2.0.0 for package: rubygems-2.0.14-24.el7.noarch
--> Processing Dependency: rubygem(io-console) >= 0.4.2 for package: rubygems-2.0.14-24.el7.noarch
--> Processing Dependency: ruby(release) for package: rubygems-2.0.14-24.el7.noarch
--> Finished Dependency Resolution
Error: Package: rubygems-2.0.14-24.el7.noarch (rhel-local)
           Requires: rubygem(psych) >= 2.0.0
Error: Package: rubygems-2.0.14-24.el7.noarch (rhel-local)
           Requires: ruby(release)
Error: Package: rubygems-2.0.14-24.el7.noarch (rhel-local)
           Requires: rubygem(rdoc) >= 4.0.0
Error: Package: rubygems-2.0.14-24.el7.noarch (rhel-local)
           Requires: rubygem(io-console) >= 0.4.2
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest


Puppet looking for rubygems package and in the RHEL 6.5 repo all of a sudden there is this rpm for Red hat Enterprise Linux 7 (el7), rather than for version 6 (el6) !!

# yum info rubygems
Loaded plugins: product-id, security, subscription-manager

Available Packages
Name        : rubygems
Arch        : noarch
Version     : 2.0.14
Release     : 24.el7
Size        : 212 k
Repo        : rhel-local
Summary     : The Ruby standard for packaging ruby libraries
URL         : http://ruby-lang.org/
License     : Ruby or MIT
Description : RubyGems is the Ruby standard for publishing and managing third party
            : libraries.


Even though rubygem 2.4.8 was also installed on the server, it still asking for rebygem is a dependency:

# gem --version
2.4.8


Ended up that culprit were both Puppet that asking for rubygems while is is already installed and Redhat that putting wrong rpm architecture in its repository. (rubygems-el7 on el6 repository).

Eventually I manually downloaded and installed rubygems rpm for el6 (rubygems-1.3.7-5.el6.noarch.rpm) and Puppet installation went smooth this time. But it takes a while to figure it out though. 





No comments:

Post a Comment