kubo / ruby-oci8

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

ruby-oci8-2.2.12/lib/oci8lib_320.so (LoadError) #259

Closed elduglas closed 4 months ago

elduglas commented 4 months ago

Hi.

I've this problem: Could not spawn process for application /home/ada/Documents/prueba: The application encountered the following error: libmql1.so: cannot open shared object file: No such file or directory - /home/ada/.rvm/gems/ruby-3.2.0@prueba/gems/ruby-oci8-2.2.12/lib/oci8lib_320.so (LoadError)

But the file really exists in the directory. image

LOCAL GEMS

abbrev (default: 0.1.1) actioncable (7.0.2) actionmailbox (7.0.2) actionmailer (7.0.2) actionpack (7.0.2) actiontext (7.0.2) actionview (7.0.2) activejob (7.0.2) activemodel (7.0.2) activerecord (7.0.2) activerecord-oracle_enhanced-adapter (7.0.2) activestorage (7.0.2) activesupport (7.0.2) base64 (default: 0.1.1) benchmark (default: 0.2.1) bigdecimal (default: 3.1.3) bootsnap (1.18.3) builder (3.2.4) bundler (default: 2.4.1) bundler-unload (1.0.2) cgi (default: 0.3.6) concurrent-ruby (1.2.3) crass (1.0.6) csv (default: 3.2.6) date (3.3.4, default: 3.3.3) debug (1.9.1, 1.7.1) delegate (default: 0.3.0) did_you_mean (default: 1.6.3) digest (default: 3.1.1) dotenv (3.0.2) dotenv-rails (3.0.2) drb (default: 2.1.1) english (default: 0.7.2) erb (default: 4.0.2) error_highlight (default: 0.5.1) erubi (1.12.0) etc (default: 1.4.2) executable-hooks (1.7.1) fcntl (default: 1.0.2) fiddle (default: 1.1.1) fileutils (default: 1.7.0) find (default: 0.1.1) forwardable (default: 1.3.3) gem-wrappers (1.4.0) getoptlong (default: 0.2.0) globalid (1.2.1) i18n (1.14.1) io-console (0.7.2, default: 0.6.0) io-nonblock (default: 0.2.0) io-wait (default: 0.3.0) ipaddr (default: 1.2.5) irb (1.11.2, default: 1.6.2) jbuilder (2.11.5) json (default: 2.6.3) logger (default: 1.5.3) loofah (2.22.0) mail (2.8.1) marcel (1.0.2) matrix (0.4.2) method_source (1.0.0) mini_mime (1.1.5) minitest (5.22.2, 5.16.3) msgpack (1.7.2) mutex_m (default: 0.1.2) net-ftp (0.2.0) net-http (default: 0.3.2) net-imap (0.4.10, 0.3.4) net-pop (0.1.2) net-protocol (0.2.2, default: 0.2.1) net-smtp (0.4.0.1, 0.3.3) nio4r (2.7.0) nkf (default: 0.1.2) nokogiri (1.16.2 x86_64-linux) observer (default: 0.1.1) open-uri (default: 0.3.0) open3 (default: 0.1.2) openssl (default: 3.1.0) optparse (default: 0.3.1) ostruct (default: 0.5.5) pathname (default: 0.2.1) power_assert (2.0.3) pp (default: 0.4.0) prettyprint (default: 0.1.1) prime (0.1.2) pstore (default: 0.1.2) psych (5.1.2, default: 5.0.1) puma (6.4.2) racc (1.7.3, default: 1.6.2) rack (2.2.8) rack-test (2.1.0) rails (7.0.2) rails-dom-testing (2.2.0) rails-html-sanitizer (1.6.0) railties (7.0.2) rake (13.1.0, 13.0.6) rbs (2.8.2) rdoc (6.6.2, default: 6.5.0) readline (default: 0.0.3) readline-ext (default: 0.1.5) reline (0.4.2, default: 0.3.2) resolv (default: 0.2.2) resolv-replace (default: 0.1.1) rexml (3.2.5) rinda (default: 0.1.1) rss (0.2.9) ruby-oci8 (2.2.12) ruby-plsql (0.8.0) ruby2_keywords (default: 0.0.5) rubygems-bundler (1.4.5) rvm (1.11.3.9) securerandom (default: 0.2.2) set (default: 1.0.3) shellwords (default: 0.1.0) singleton (default: 0.1.1) sqlite3 (1.7.2 x86_64-linux) stringio (3.1.0, default: 3.0.4) strscan (default: 3.0.5) syntax_suggest (default: 1.0.2) syslog (default: 0.1.1) tempfile (default: 0.1.3) test-unit (3.5.7) thor (1.3.0) time (default: 0.2.1) timeout (0.4.1, default: 0.3.1) tmpdir (default: 0.1.3) tsort (default: 0.1.1) typeprof (0.21.3) tzinfo (2.0.6) un (default: 0.2.1) uri (default: 0.12.0) weakref (default: 0.1.2) websocket-driver (0.7.6) websocket-extensions (0.1.5) yaml (default: 0.2.1) zeitwerk (2.6.13) zlib (default: 3.0.0)

Ubuntu 22.04

Oracle version: 12.1 image

Thanks so much!!!

kubo commented 4 months ago

Could you check the directory where Oracle client is installed?

libmql1.so: cannot open shared object file: No such file or directory

libmql1.so is depended by libclntsh.so.12.1 (when Oracle client version is 12.1), which is depended by oci8lib_320.so.

If libmql1.so and libclntsh.so.12.1 are in the same directory, could you set the environment variable LD_LIBRARY_PATH pointing to the directory. See https://stackoverflow.com/questions/45217148/error-loading-oci8-so-with-ubuntu-server-17-04-php-7-and-apache2.

elduglas commented 4 months ago

image

sudo ldconfig

image

source .bashrc sudo service nginx restart.

but it's the same. image

when I use (rails s) works, but when I tried to use passenger or puma doesn't works.

elduglas commented 4 months ago

Hello @kubo, the solution is to add those two lines in the .profile file and not in the .bashrc.

Thanks so much!!!!