2016-09-04 24 views
0

我有以下版本的ruby,rails和gem ...我想在Ubuntu 12.04中安裝pupetmaster。但是當我嘗試安裝puppetmaster時,我得到了下面的錯誤。Ubuntu中的puppetmaster服務啓動錯誤12.04

可能的原因是什麼?以及如何解決它?

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) 

這是錯誤,當我嘗試啓動服務

sudo service puppetmaster start 

* Starting puppet master

/usr/lib/ruby/1.8/puppet/application.rb:1: 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:in要求'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 r 4

+0

什麼版本的puppet/puppetserver? –

+0

木偶版本2.7.x,我認爲主人是3.x – Kenshin

+0

好,所以你的Ruby版本被支持。接下來要檢查的是爲什麼你認爲你的Ruby版本是1.9.3,而Puppet認爲它是1.8.7。你用'gem'或'apt'安裝了Puppet嗎?與往常一樣,考慮升級到受支持的最低版本的Puppet(3.8.7)。 –

回答

0

這些問題的出現,如果你有一個: '從 /usr/lib/ruby/1.8/puppet/util/command_line.rb:59:in'執行' 從 在/ usr/bin中/傀儡equire_application破碎的紅寶石安裝。 在Ubuntu 12.04中,要安裝puppetmaster服務,您絕對需要將Ruby 1.9.3作爲系統ruby。

如果您使用的是rvm或chruby,請確保您使用的是正確的版本(1.9.3),並且確保您沒有在系統中安裝rvm和不同版本的Ruby的不同版本的ruby並且在bashrc中存在路徑衝突。