kubo / ruby-oci8

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

oci8lib.c:156:in oci8lib_230.so: OCI Library Initialization Error - /mnt/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1 (OCIError) #132

Closed ghost closed 8 years ago

ghost commented 8 years ago

Hi guys,

Could you please help me to resolve the following issue:

oci8lib.c:156:in oci8lib_230.so: OCI Library Initialization Error - /mnt/oracle/product/11.1.0/db_1/lib/libclntsh.so.11.1 (OCIError)
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in 'require'
    from /opt/sensu/embedded/lib/ruby/gems/2.3.0/gems/ruby-oci8-2.2.2/lib/oci8.rb:72:in '<top (required)>'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in 'require'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:133:in 'rescue in require'
    from /opt/sensu/embedded/lib/ruby/site_ruby/2.3.0/rubygems/core_ext/kernel_require.rb:40:in 'require'
    from /opt/sensu/embedded/bin/flashback.rb:3:in '<main>'

I'm getting it while executing code as sensu plugin. The problem is that I'm able to run it as 'sudo -u sensu /opt/sensu/embedded/bin/flashback.rb'. Could it be a problem with variables or anything? LD_LIBRARY_PATH is declared in /etc/environment though.

kubo commented 8 years ago

I guess that you uses full client (not instant client). If so, you need to set the environment variable ORACLE_HOME=/mnt/oracle/product/11.1.0/db_1.

ghost commented 8 years ago

Whoa! It works. Thanks a million!