我有以下版本的ruby,rails和gem ...我想在ubuntu 12.04中安装pupetmaster。但是当我尝试安装puppetmaster时,我收到以下错误。
可能的原因是什么?以及如何解决它?
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: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:in
要求'来自 /usr/lib/ruby/1.8/puppet/application/master.rb:1来自 /usr/lib/ruby/1.8/puppet/util/command_line.rb:54:inrequire' from /usr/lib/ruby/1.8/puppet/util/command_line.rb:54:in
require_application'来自 /usr/lib/ruby/1.8/puppet/util/command_line.rb:59:in`exemand'from 的/ usr /斌/木偶:4
答案 0 :(得分:0)
如果您的ruby安装损坏,则会出现这些问题。 在Ubuntu 12.04中,要安装puppetmaster服务,你肯定需要Ruby 1.9.3作为系统ruby。
如果您使用的是rvm或chruby,请确保您使用的是正确的版本(1.9.3),并确保您没有安装rvm和不同版本的Ruby的不同版本的ruby系统和bashrc中存在路径冲突。