安装rhc(红帽客户端工具)时出错。

3
我按照Openshift网站上的说明安装了rhc。当我运行gem install rhchgem update rhc时,一切似乎都很好,但是当我尝试调用rhc时,我会收到下面的消息。我尝试重新安装ruby和git,包括32位和64位版本。我还以为问题是缺少openssl,但安装它没有任何改变。
我已经无计可施,非常感谢任何帮助。
c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:54:in `requir
e': cannot load such file -- dl/import (LoadError)
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/
authentication/pageant.rb:1:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/
authentication/agent/socket.rb:5:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/
authentication/agent.rb:22:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/
authentication/key_manager.rb:4:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh/
authentication/session.rb:4:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/net-ssh-2.9.2/lib/net/ssh.
rb:11:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/ssh_hel
pers.rb:18:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.
rb:77:in `<class:Wizard>'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.
rb:7:in `<module:RHC>'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/wizard.
rb:6:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s/base.rb:4:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s/account.rb:2:in `<module:Commands>'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s/account.rb:1:in `<top (required)>'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/2.2.0/rubygems/core_ext/kernel_require.rb:
54:in `require'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s.rb:189:in `block in load'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s.rb:188:in `each'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/command
s.rb:188:in `load'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/lib/rhc/cli.rb:
36:in `start'
        from c:/local/Ruby22/lib/ruby/gems/2.2.0/gems/rhc-1.35.1/bin/rhc:20:in `
<top (required)>'
        from c:/local/Ruby22/bin/rhc:23:in `load'
        from c:/local/Ruby22/bin/rhc:23:in `<main>'

可能是rhc setup gives error 'no such file dl/import'的重复问题。 - user719662
3个回答

9

可能是另一个缺失的库?或者(没有检查),但2.9.3.beta1现在可能是一个2.9.3版本。 - ptav

2

检查您的Ruby版本。 RHC不兼容Ruby 2或更高版本。 如果是这样,请卸载Ruby并安装1.9.3版本,然后gem install rhc,最后rhc setup。 这对我起作用了,而升级net-ssh从未解决问题。


0
假设您已经安装了rhc。 首先使用以下命令卸载2.9.2版本:
gem uninstall net-ssh -v 2.9.1

然后安装

gem install net-ssh -v 2.9.3.beta1

进入此文件夹后,您的宝石规范文件夹为:ruby\lib\ruby\gems\version\specifications,然后通过更改所有内容来编辑rhc-x.xx.x.gemspec

      s.add_runtime_dependency(%q<net-ssh>, ["<= 2.9.2"])

进入

      s.add_runtime_dependency(%q<net-ssh>, [">= 2.9.2"])

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接