ruby 错误:无法构建gem本机扩展,(Mac Mountain Lion / Compass / RVM)

4si2a6ki  于 2022-12-12  发布在  Ruby
关注(0)|答案(1)|浏览(166)

我不知道该怎么解决这个问题。
我重新安装了以前丢失的Xcode命令行工具-但问题仍然存在。
Compass和CodeKit没有按预期工作。
你知道该怎么做吗?

Marcs-Mac-mini:~ marc$ gem update --system
Error loading RubyGems plugin "/Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1/lib/rubygems_plugin.rb": ERROR: Failed to build gem native extension.

    /usr/local/Cellar/ruby/2.1.0/bin/ruby extconf.rb
/usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1f/lib/libcrypto.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Reason: image not found - /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl.rb:17:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/security.rb:11:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/package.rb:43:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/installer.rb:9:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1/lib/executable-hooks/regenerate_binstubs_command.rb:2:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from extconf.rb:16:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1 for inspection.
Results logged to /Users/marc/.rvm/gems/ruby-2.1.0@global/extensions/x86_64-darwin-12/2.1.0/executable-hooks-1.3.1/gem_make.out
 (Gem::Ext::BuildError)
Error loading RubyGems plugin "/Users/marc/.rvm/gems/ruby-2.1.0@global/gems/gem-wrappers-1.2.4/lib/rubygems_plugin.rb": ERROR: Failed to build gem native extension.

    /usr/local/Cellar/ruby/2.1.0/bin/ruby extconf.rb
/usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require': dlopen(/usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1f/lib/libcrypto.1.0.0.dylib (LoadError)
  Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Reason: image not found - /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/openssl.rb:17:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/security.rb:11:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/package.rb:43:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/installer.rb:9:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1/lib/executable-hooks/regenerate_binstubs_command.rb:2:in `<top (required)>'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/rubygems/core_ext/kernel_require.rb:55:in `require'
  from extconf.rb:16:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in /Users/marc/.rvm/gems/ruby-2.1.0@global/gems/executable-hooks-1.3.1 for inspection.
Results logged to /Users/marc/.rvm/gems/ruby-2.1.0@global/extensions/x86_64-darwin-12/2.1.0/executable-hooks-1.3.1/gem_make.out
 (Gem::Ext::BuildError)
ERROR:  Loading command: update (LoadError)
  dlopen(/usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle, 9): Library not loaded: @@HOMEBREW_CELLAR@@/openssl/1.0.1f/lib/libcrypto.1.0.0.dylib
  Referenced from: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Reason: image not found - /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/x86_64-darwin12.0/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke_with_build_args' for nil:NilClass
zsbz8rwp

zsbz8rwp1#

好吧......好像自己解决了:

gem uninstall compass
gem uninstall sass
gem install sass
gem install compass

执行这些步骤后,问题仍未解决...
rvm重新安装ruby-2.1.0成功了...

相关问题