带有openssl.so的Rails LoadError:未定义符号:d2i_ECPKParameters [英] Rails LoadError with openssl.so: undefined symbol: d2i_ECPKParameters
问题描述
Rails 3.2.1
Rails 3.2.1
红宝石1.9.3p0(2011-10-30)[x86_64-linux]
ruby 1.9.3p0 (2011-10-30) [x86_64-linux]
openssl-0.9.8e-20.el5 openssl-devel-0.9.8e-20.el5 openssl-0.9.8e-20.el5
openssl-0.9.8e-20.el5 openssl-devel-0.9.8e-20.el5 openssl-0.9.8e-20.el5
Linux 2.6.18-274.7.1.el5#1 SMP Mon Oct 17 11:57:14 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
Linux 2.6.18-274.7.1.el5 #1 SMP Mon Oct 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/
推荐答案
当您在安装ruby之前不安装openssl时,会出现此问题.有两个修复程序:
This problem arises when you don't install openssl prior to installing ruby. There are two fixes:
-
(建议的修复程序)安装openssl,然后重新编译您的ruby版本.假设您使用的是rvm,则可以执行以下操作来解决此问题:
rvm pkg install openssl
然后rvm remove 1.9.3
然后rvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
会使用openssl编译ruby.
(Suggested fix) Install openssl and then recompile your version of ruby. Assuming you are using rvm, you can solve this by doing:
rvm pkg install openssl
thenrvm remove 1.9.3
thenrvm install 1.9.3 --with-openssl-dir=$HOME/.rvm/usr
which compiles ruby with openssl.
修改您的Gemfile以说source "http://rubygems.org"
而不是source "https://rubygems.org"
Modify your Gemfile to say source "http://rubygems.org"
instead of source "https://rubygems.org"
选项2更快,更容易,但是将来可能会引起问题.
Option 2 is quicker and easier, but more likely to cause problems in the future.
这篇关于带有openssl.so的Rails LoadError:未定义符号:d2i_ECPKParameters的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!