kubo / ruby-oci8

Ruby-oci8 - Oracle interface for ruby
Other
169 stars 75 forks source link

Bundle install returns error: cannot get Oracle version from sqlplus #140

Closed meonthewire closed 7 years ago

meonthewire commented 7 years ago

What happens? Any ideas?

` Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

/home/leo/.rbenv/versions/2.1.8/bin/ruby extconf.rb

checking for load library path... LD_LIBRARY_PATH... checking /opt/oracle/instantclient_12_1... skip: /opt/oracle/instantclient_12_1/libclntsh.so.12.1 is for i386 cpu. checking ld.so.conf... no checking for cc... ok checking for gcc... yes checking for LP64... yes checking for sys/types.h... yes checking for ruby header... ok Get the version of Oracle from SQLPlus... ** 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/leo/.rbenv/versions/2.1.8/bin/ruby --with-instant-client --without-instant-client /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:834:in get_version': RuntimeError (RuntimeError) from /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:783:in initialize' from /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in new' from /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in get'

from extconf.rb:22:in `
'

Error Message: cannot get Oracle version from sqlplus Backtrace: /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:834:in get_version' /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:783:in initialize' /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in new' /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2/ext/oci8/oraconf.rb:320:in get'

extconf.rb:22:in `
'

See:

extconf failed, exit code 1

Gem files will remain installed in /home/leo/development/cloudficacao/.bundle/gems/gems/ruby-oci8-2.2.2 for inspection. Results logged to /home/leo/development/cloudficacao/.bundle/gems/extensions/x86_64-linux/2.1.0-static/ruby-oci8-2.2.2/gem_make.out

An error occurred while installing ruby-oci8 (2.2.2), and Bundler cannot continue. Make sure that gem install ruby-oci8 -v '2.2.2' succeeds before bundling. `

kubo commented 7 years ago
checking /opt/oracle/instantclient_12_1... skip:
/opt/oracle/instantclient_12_1/libclntsh.so.12.1 is for i386 cpu.

You need to use Oracle client for x86_64.

meonthewire commented 7 years ago

Great! Thanks for helping :smile: