我執行無法在Ubuntu上安裝12.04LTS紅寶石OCI8
$ bundle install
對於我的Rails應用程序...(3.2.8)
權當它到達紅寶石OCI8 ...
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension.
/home/ubuntu/.rvm/rubies/ruby-1.9.3-p448/bin/ruby extconf.rb
checking for load library path...
LD_LIBRARY_PATH...
checking /usr/lib/oracle/12.1/client/... no
checking ld.so.conf... no
checking for cc... ok
checking for gcc... yes
checking for LP64... no
checking for sys/types.h... yes
checking for ruby header... ok
Get the version of Oracle from SQL*Plus... *** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.
Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/home/ubuntu/.rvm/rubies/ruby-1.9.3-p448/bin/ruby
--with-instant-client
--without-instant-client
/home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:760:in `get_version': RuntimeError (RuntimeError)
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:709:in `initialize'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new'
from /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get'
from extconf.rb:18:in `<main>'
---------------------------------------------------
Error Message:
cannot get Oracle version from sqlplus
Backtrace:
/home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:760:in `get_version'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:709:in `initialize'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `new'
/home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/oraconf.rb:320:in `get'
extconf.rb:18:in `<main>'
---------------------------------------------------
See:
* http://ruby-oci8.rubyforge.org/en/HowToInstall.html
* http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html
Gem files will remain installed in /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5 for inspection.
Results logged to /home/ubuntu/.rvm/gems/ruby-1.9.3-p448/gems/ruby-oci8-2.1.5/ext/oci8/gem_make.out
An error occurred while installing ruby-oci8 (2.1.5), and Bundler cannot continue.
Make sure that `gem install ruby-oci8 -v '2.1.5'` succeeds before bundling.
我做了一切從約每個網站和論壇(特別是從這裏)。這一個我覺得是最接近的... http://jigyasamakkar.com/ruby-oci8-with-rails-3-1-on-ubuntu/
什麼是解決這個問題的最好方法?
我試圖找出如何安裝它。 這很奇怪,但它看起來像你需要有oracle數據庫實際安裝在客戶端上!如果發現奇怪。 您的錯誤: 錯誤消息: 無法從sqlplus獲得Oracle版本 似乎指向這一點。在提到的解決方案的鏈接中,他還提到了Oracle安裝。在這方面沒有很好的解釋 - >「它應該被設置到你的Oracle的安裝位置」 –