2012-03-16 13 views
1

導軌--version

的Rails 3.2.1滑軌LoadError與openssl.so:未定義符號:d2i_ECPKParameters

紅寶石-v

紅寶石1.9.3p0(2011-10-30)[x86_64的-linux]

rpm -qa | grep的OpenSSL的

的OpenSSL 0.9.8e-20.el5 的OpenSSL devel的-0.9.8e-20.el5 的OpenSSL 0.9.8e-20.el5

UNAME -a

的Linux 2.6 .18-274.7.1.el5#1 SMP週一10月17日11時57分14秒EDT 2011 x86_64的x86_64的x86_64的GNU/Linux的

軌道的新博客

create 
    create README.rdoc 
    create Rakefile 
    create config.ru 
    create .gitignore 
    create Gemfile 
    create app 
    create app/assets/images/rails.png 
    create app/assets/javascripts/application.js 
    create app/assets/stylesheets/application.css 
    create app/controllers/application_controller.rb 
    create app/helpers/application_helper.rb 
    create app/mailers 
    create app/models 
    create app/views/layouts/application.html.erb 
    create app/mailers/.gitkeep 
    create app/models/.gitkeep 
    create config 
    create config/routes.rb 
    create config/application.rb 
    create config/environment.rb 
    create config/environments 
    create config/environments/development.rb 
    create config/environments/production.rb 
    create config/environments/test.rb 
    create config/initializers 
    create config/initializers/backtrace_silencers.rb 
    create config/initializers/inflections.rb 
    create config/initializers/mime_types.rb 
    create config/initializers/secret_token.rb 
    create config/initializers/session_store.rb 
    create config/initializers/wrap_parameters.rb 
    create config/locales 
    create config/locales/en.yml 
    create config/boot.rb 
    create config/database.yml 
    create db 
    create db/seeds.rb 
    create doc 
    create doc/README_FOR_APP 
    create lib 
    create lib/tasks 
    create lib/tasks/.gitkeep 
    create lib/assets 
    create lib/assets/.gitkeep 
    create log 
    create log/.gitkeep 
    create public 
    create public/404.html 
    create public/422.html 
    create public/500.html 
    create public/favicon.ico 
    create public/index.html 
    create public/robots.txt 
    create script 
    create script/rails 
    create test/fixtures 
    create test/fixtures/.gitkeep 
    create test/functional 
    create test/functional/.gitkeep 
    create test/integration 
    create test/integration/.gitkeep 
    create test/unit 
    create test/unit/.gitkeep 
    create test/performance/browsing_test.rb 
    create test/test_helper.rb 
    create tmp/cache 
    create tmp/cache/assets 
    create vendor/assets/javascripts 
    create vendor/assets/javascripts/.gitkeep 
    create vendor/assets/stylesheets 
    create vendor/assets/stylesheets/.gitkeep 
    create vendor/plugins 
    create vendor/plugins/.gitkeep 
    run bundle install 
/usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': /usr/local/lib/ruby/1.9.1/x86_64-linux/openssl.so: undefined symbol: d2i_ECPKParameters - /usr/local/lib/ruby/1.9.1/x86_64-linux/openssl.so (LoadError) 
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/lib/ruby/1.9.1/openssl.rb:17:in `<top (required)>' 
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/lib/ruby/1.9.1/net/https.rb:22:in `<top (required)>' 
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require' 
    from /usr/local/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:316:in `connection_for' 
    from /usr/local/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:368:in `request' 
    from /usr/local/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:203:in `fetch_http' 
    from /usr/local/lib/ruby/1.9.1/rubygems/remote_fetcher.rb:231:in `fetch_path' 
    from /usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:265:in `load_specs' 
    from /usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:231:in `block in list' 
    from /usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `each' 
    from /usr/local/lib/ruby/1.9.1/rubygems/spec_fetcher.rb:227:in `list' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:253:in `fetch_all_remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:234:in `block in remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `each' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:231:in `remote_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:165:in `fetch_specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/source.rb:70:in `specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:176:in `block (2 levels) in index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `each' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:175:in `block in index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/index.rb:7:in `build' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:174:in `index' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:168:in `resolve' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:107:in `specs' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/definition.rb:102:in `resolve_remotely!' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/installer.rb:43:in `run' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/installer.rb:8:in `install' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/cli.rb:219:in `install' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/task.rb:22:in `run' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor.rb:263:in `dispatch' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/lib/bundler/vendor/thor/base.rb:386:in `start' 
    from /usr/local/lib/ruby/gems/1.9.1/gems/bundler-1.0.22/bin/bundle:13:in `<main>' 
Fetching source index for https://rubygems.org/ 

回答

11

的時候你不在插件這個問題的產生在安裝紅寶石之前高大的openssl。有兩種解決方法:

  1. (建議的修復)將OpenSSL安裝,然後重新編譯你的Ruby版本。假設你正在使用rvm,你可以通過下面的方法來解決這個問題:rvm pkg install openssl然後rvm remove 1.9.3然後rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr編譯ruby openssl。

  2. 修改您的Gemfile說的source "http://rubygems.org"代替source "https://rubygems.org"

方案2是更快,更容易,更容易在未來造成的問題。

2

rvm pkg已被棄用。

相反試試這個,如果你運行的是最新版本的RVM(如1.21):

rvm autolibs enable 
rvm reinstall <ruby> 

哪裏<ruby>是您正在使用的紅寶石版本。 (例如rvm重新安裝1.9.3)

重新安裝ruby後,請檢查您的.ruby-version文件(替換最新版本的rvm中的.rvmrc)並確保它設置爲新版本的ruby。

我最終刪除了gemset,並在所有工作正常之前重新創建它。

0

我有同樣的問題,但環境不同。 Openssl工具默認已安裝。 Ruby 1.9.2p320默認安裝在/ usr/local,我使用rbenv在自定義位置安裝其他ruby。在rbenv的ruby 1.8.7和openssl中使用Rails產生了未定義的符號:d2i_ECPKParameters錯誤。

要解決它,我不顧我的系統默認的Ruby和Ruby安裝1.8.7到/ usr /本地,並通過安裝其 的OpenSSL:

# after installing ruby 1.8.7 to /usr/local 
# make sure the recent install ruby 1.8.7 is the default ruby 
cd ruby-1.8.7-pXXX/ext/openssl 
ruby extconf.rb 
make 
make install 

然後創建從近期將OpenSSL安裝一個符號鏈接.so在我的rbenv's ruby​​的/ usr/local中 1.8。7的lib/ruby​​/site_ruby/1.8/x86_64-linux/openssl.so

Rails啓動時不再出現d2i_ECPKParameters錯誤。