Search code examples
ubuntu-12.04puppet

puppetmaster service start error in Ubuntu 12.04


I have the following versions of ruby,rails and gem... I want to install pupetmaster in ubuntu 12.04. But when I try to install puppetmaster, I am getting the below error.

What could be the possible reasons? and how to fix it ?

ruby : ruby 1.9.3p0 (2011-10-30 revision 33570) [x86_64-linux]

rails: Rails 4.0.0

gem -v
Ignoring executable-hooks-1.3.2 because its extensions are not built.  Try: gem pristine executable-hooks --version 1.3.2
Error loading RubyGems plugin "/home/lhdadmin/.gem/ruby/1.9.1/gems/executable-hooks-1.3.2/lib/rubygems_plugin.rb": cannot load such file -- executable-hooks/wrapper (LoadError)
2.6.6

sudo gem list

*** LOCAL GEMS ***

actionmailer (4.0.0)
actionpack (4.2.2, 4.0.0)
actionview (4.2.2)
activejob (4.2.2)
activemodel (4.2.2, 4.0.0)
activerecord (4.2.2, 4.0.0)
activerecord-deprecated_finders (1.0.4)
activesupport (4.2.2, 4.0.0)
arel (6.0.3, 4.0.2)
bigdecimal (1.1.0)
builder (3.2.2, 3.1.4)
bundler (1.12.5)
concurrent-ruby (1.0.2)
erubis (2.7.0)
executable-hooks (1.3.2)
globalid (0.3.7)
hike (1.2.3)
i18n (0.7.0)
io-console (0.3)
json (1.8.3, 1.5.4)
loofah (2.0.3)
mail (2.5.4)
mime-types (1.25.1)
mini_portile2 (2.1.0)
minitest (5.9.0, 4.7.5, 2.5.1)
multi_json (1.12.1)
nokogiri (1.6.8)
pkg-config (1.1.7)
polyglot (0.3.5)
rack (1.6.4, 1.5.5)
rack-test (0.6.3)
rails (4.0.0)
rails-deprecated_sanitizer (1.0.3)
rails-dom-testing (1.0.7)
rails-html-sanitizer (1.0.3)
railties (4.0.0)
rake (0.9.2.2)
rdoc (3.9.4)
rubygems-update (2.6.6)
sprockets (2.12.4)
sprockets-rails (2.0.1)
thor (0.19.1)
thread_safe (0.3.5)
tilt (1.4.1)
treetop (1.4.15)
tzinfo (1.2.2, 0.3.51)

And this is the error when I try to start the service

sudo service puppetmaster start

* Starting puppet master

/usr/lib/ruby/1.8/puppet/application.rb:1:in require': no such file to load -- optparse (LoadError) from /usr/lib/ruby/1.8/puppet/application.rb:1 from /usr/lib/ruby/1.8/puppet/application/master.rb:1:inrequire' from /usr/lib/ruby/1.8/puppet/application/master.rb:1 from /usr/lib/ruby/1.8/puppet/util/command_line.rb:54:in require' from /usr/lib/ruby/1.8/puppet/util/command_line.rb:54:in require_application' from /usr/lib/ruby/1.8/puppet/util/command_line.rb:59:in `execute' from /usr/bin/puppet:4


Solution

  • These issues arise if you have a broken ruby installation. In Ubuntu 12.04, to install puppetmaster service, you definitely need Ruby 1.9.3 as the system ruby.

    If you are using rvm or chruby, make sure you are using the right version ( 1.9.3 ) and also make sure that you don't have a different version of ruby installed with rvm and different version of Ruby in system and there is conflicts of path in bashrc.