错误消息:无法从sqlplus获取Oracle版本

时间:2015-12-31 09:49:53

标签: ruby oracle ubuntu oci8

Ruby-oci8 gem在ubuntu linux上构建时失败并显示以下错误消息,即使我将LD_LIBRARY_PATH和ORACLE_HOME设置为正确的路径。

  

*从SQLPlus获取Oracle版本... /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb   失败由于某些原因无法创建Makefile,可能缺少   必要的库和/或标题。检查mkmf.log文件以获取更多信息   细节。您可能需要配置选项。

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=/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8
 --curdir
 --ruby=/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby2.1/export/bin/ruby
 --with-instant-client
 --without-instant-client
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:834:in `get_version': RuntimeError (RuntimeError)
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:783:in `initialize'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `new'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in `get'
 from /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb:22:in `<main>'

错误讯息:

  

无法从sqlplus获取Oracle版本Backtrace:
  /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:834:in   get_version'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:783:in
初始化&#39;
  /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in   new'
/ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/oraconf.rb:320:in
让&#39;
  /ghostcache/nightly_build/components/ruby-oci8/akamai/ruby-oci8/ruby-oci8-2.2.1/ext/oci8/extconf.rb:22:in   `&#39; *

知道这里缺少什么吗?

1 个答案:

答案 0 :(得分:1)

就我而言,我只需要在ORACLE_HOME下创建一个“bin”子目录,然后在那里创建一个指向sqlplus二进制文件的链接。