Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Tiago Melo
RE: Cannot install ruby-oci8 gem - Redhat 4.5 [ reply ]  
2011-11-26 11:14
Thanks Kubo :D

By: Kubo Takehiro
RE: Cannot install ruby-oci8 gem - Redhat 4.5 [ reply ]  
2011-11-26 03:33
> checking /usr/lib/oracle/11.2/client/lib/... skip: /usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1 is for i386 cpu.

You need to use an instant client for x86_64.

By: Tiago Melo
RE: Cannot install ruby-oci8 gem - Redhat 4.5 [ reply ]  
2011-11-24 11:38
Here's the last lines of my mkmf.log:

"gcc -o conftest -I. -I/home/csp/.rvm/rubies/ruby-1.8.7-p352/lib/ruby/1.8/x86_64-linux -I. -g -O2 -fPIC -I/usr/include/oracle/11.2/client conftest.c -L. -L/home/csp/.rvm/rubies/ruby-1.8.7-p352/lib -Wl,-R/home/csp/.rvm/rubies/ruby-1.8.7-p352/lib -L. -rdynamic -Wl,-export-dynamic -L/home/csp/.rvm/rubies/ruby-1.8.7-p352/lib -L/usr/lib/oracle/11.2/client/lib/ -lclntsh -lruby-static -L/home/csp/.rvm/rubies/ruby-1.8.7-p352/lib -L/usr/lib/oracle/11.2/client/lib/ -lclntsh -lrt -ldl -lcrypt -lm -lc"
conftest.c: In function 't':
conftest.c:5: error: too few arguments to function 'OCIInitialize'
checked program was:
/* begin */
1: #include <oci.h>
2:
3: /*top*/
4: int main() { return 0; }
5: int t() { OCIInitialize(); return 0; }
/* end */

By: Tiago Melo
Cannot install ruby-oci8 gem - Redhat 4.5 [ reply ]  
2011-11-24 11:25
Hi,

I've managed to install all the oracle packages and I'm able to use sqlplus without any problem, like this:

$ sqplus myuser@database />
But when I try to install the gem...

ruby-1.8.7@csp [csp@s5700as132 ~]$ gem install ruby-oci8
Building native extensions. This could take a while...
ERROR: Error installing ruby-oci8:
ERROR: Failed to build gem native extension.

/home/csp/.rvm/rubies/ruby-1.8.7-p352/bin/ruby extconf.rb
checking for load library path...
LD_LIBRARY_PATH...
checking /usr/lib/oracle/11.2/client/lib/... skip: /usr/lib/oracle/11.2/client/lib/libclntsh.so.11.1 is for i386 cpu.
looks like an instant client.
checking for cc... ok
checking for gcc... yes
checking for LP64... yes
checking for ruby header... ok
checking for OCIInitialize() in oci.h... no
*** 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/csp/.rvm/rubies/ruby-1.8.7-p352/bin/ruby
--with-instant-client
--without-instant-client
./oraconf.rb:1192:in `initialize': RuntimeError (RuntimeError)
from ./oraconf.rb:343:in `new'
from ./oraconf.rb:343:in `get'
from extconf.rb:18
---------------------------------------------------
Error Message:
Could not compile with Oracle instant client.
You may need to set a environment variable:
LD_LIBRARY_PATH=/usr/lib/oracle/11.2/client/lib/
export LD_LIBRARY_PATH

Backtrace:
./oraconf.rb:1192:in `initialize'
./oraconf.rb:343:in `new'
./oraconf.rb:343:in `get'
extconf.rb:18
---------------------------------------------------
See:
* http://ruby-oci8.rubyforge.org/en/HowToInstall.html
* http://ruby-oci8.rubyforge.org/en/ReportInstallProblem.html



Gem files will remain installed in /home/csp/.rvm/gems/ruby-1.8.7-p352@csp/gems/ruby-oci8-2.0.6 for inspection.
Results logged to /home/csp/.rvm/gems/ruby-1.8.7-p352@csp/gems/ruby-oci8-2.0.6/ext/oci8/gem_make.out


My LD_LIBRARY_PATH environment variable is set. So, any clue?

Thank you very much.