安装 puppet 和 hiera
sudo rpm -ivh http://yum.puppetlabs.com/el/6.4/products/x86_64/puppetlabs-release-6-11.noarch.rpm
sudo yum update -y
sudo yum -y install vim unzip rubygems puppet puppet-server hiera-puppet git
结果是:
Resolving Dependencies
--> Running transaction check
---> Package hiera-puppet.noarch 0:1.0.0-1.el6 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================
Package Arch Version Repository Size
=================================================================================
Installing:
hiera-puppet noarch 1.0.0-1.el6 puppetlabs-products 14 k
Transaction Summary
=================================================================================
Install 1 Package(s)
Total size: 14 k
Installed size: 14 k
Downloading Packages:
Running rpm_check_debug
Running Transaction Test
Transaction Check Error:
file /usr/bin/extlookup2hiera from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera/backend/puppet_backend.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera/scope.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera_puppet.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_array.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_hash.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_include.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
问题是如何解决这个install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.7.1-1.el6.noarch
问题。
发现了类似的问题这里。但是,该解决方案upgrading puppet from version 3.4.2 to 3.4.3
并不适用于此问题。
Depending on your versions, you may receive an error, though
Error: Execution of '/usr/bin/yum -d 0 -e 0 -y install hiera-puppet' returned 1:
Transaction Check Error:
file /usr/bin/extlookup2hiera from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera/backend/puppet_backend.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera/scope.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/hiera_puppet.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_array.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_hash.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
file /usr/lib/ruby/site_ruby/1.8/puppet/parser/functions/hiera_include.rb from install of hiera-puppet-1.0.0-1.el6.noarch conflicts with file from package puppet-3.4.3-1.el6.noarch
Error Summary
-------------
That’s correct, there’s no Error Summary. This error appears to be because the hiera-puppet version has a conflict with puppet 3.4.2. Upgrading to 3.4.3 or higher resolved this issue.
答案1
Puppet 3 包含 hiera 并且不需要为其安装任何其他软件包。