简体   繁体   English

捆绑安装库未加载错误

[英]bundle install Library not loaded error

Environment: 环境:

  • Rails 3.2.11 导轨3.2.11
  • Heroku bamboo-mri-1.9.2 Heroku Bamboo-Mri 1.9.2
  • Using RVM 使用RVM
  • ruby-1.9.2-p290 红宝石1.9.2-p290

my .rvmrc is configured to use ruby-1.9.2-p290 我的.rvmrc配置为使用ruby-1.9.2-p290

When running the bundle install command, I am getting this: 运行bundle install命令时,出现以下错误:

/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Library not loaded: /opt/local/lib/libcrypto.1.0.0.dylib (LoadError)
  Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
  Reason: image not found - /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
    from /Users/joel/.rvm/rubies/ruby-1.9.2-p290/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/cli.rb:245:in `install'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/bin/bundle:19:in `load'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/bin/bundle:19:in `<main>'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/joel/.rvm/gems/ruby-1.9.2-p290@global/bin/ruby_noexec_wrapper:14:in `<main>'

Any ideas on how to resolve this? 有关如何解决此问题的任何想法?

TRY 1 尝试1

rvm pkg install openssl

rvm reinstall all --force

then cd .. and cd project_folder 然后cd ..和cd project_folder

bundle install

All gem install again properly 所有宝石再次正确安装

the first error is gone BUT when I move into another project using ruby 1.9.3, I get a 'new' error, so it seems like I won't be able to use at the same time 1.9.2 and 1.9.3 ... or I'll have to reinstall my gems everytime ??? 但是当我使用ruby 1.9.3进入另一个项目时,第一个错误消失了,但是出现了“新”错误,因此看来我将无法同时使用1.9.2和1.9.3。 ..否则我每次都必须重新安装我的宝石??? I must missing something. 我必须错过一些东西。

here the new error: 这里是新错误:

/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': dlopen(/Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle, 9): Symbol not found: _rb_Digest_SHA1_Finish (LoadError)
  Referenced from: /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
  Expected in: flat namespace
 in /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle - /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/1.9.1/x86_64-darwin11.4.2/digest/sha1.bundle
    from /Users/joel/.rvm/rubies/ruby-1.9.3-p429/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/definition.rb:1:in `<top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler.rb:148:in `definition'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/cli.rb:301:in `update'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/task.rb:27:in `run'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/invocation.rb:120:in `invoke_task'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/vendor/thor.rb:344:in `dispatch'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/vendor/thor/base.rb:434:in `start'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/bin/bundle:20:in `block in <top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/lib/bundler/friendly_errors.rb:3:in `with_friendly_errors'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/gems/bundler-1.3.5/bin/bundle:20:in `<top (required)>'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/bin/bundle:19:in `load'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@global/bin/bundle:19:in `<main>'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@creativebank/bin/ruby_noexec_wrapper:14:in `eval'
    from /Users/joel/.rvm/gems/ruby-1.9.3-p429@creativebank/bin/ruby_noexec_wrapper:14:in `<main>'

Since you mentioned you recently moved from MacPorts to Homebrew, I'd say it's likely that you had some gems that were compiled against a MacPorts-installed library ( in /opt/local ) that doesn't exist anymore. 自从您提到您最近从MacPorts迁移到Homebrew以来,我想您很可能已经将某些宝石根据MacPorts安装的库( in /opt/local )编译了,不再存在。 You should recompile those gems to link against the Homebrew-supplied versions of those libraries (or the Apple ones, if they exist). 您应该重新编译这些gem,以链接到这些库的Homebrew提供的版本(如果存在,则为Apple的版本)。 You can recompile a gem with native components simply be re-installing it. 您只需重新安装即可使用本地组件重新编译gem。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM