14
  • echo $PATH gives me below result :

/home/mayank/bin:/usr/lib/lightdm/lightdm:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-7-oracle/bin:/usr/lib/jvm/java-7-oracle/db/bin:/usr/lib/jvm/java-7-oracle/jre/bin:/usr/lib/oracle/12.1/client/bin

  • echo $ORACLE_HOME fetches :

/usr/lib/oracle/12.1/client

  • echo LD_LIBRARY_PATH gives (set through /etc/bash.bashrc earlier, but now its showing as below)

LD_LIBRARY_PATH

doing vim for .bash_profile shows below things set :

[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" #
Load RVM into a shell session *as a function*

LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
    export LD_LIBRARY_PATH

PATH=$PATH:/usr/local/bin
    export PATH

Despite setting the ld_library_path in above file I'm still not getting the correct path in env despite running sudo ldconfig and then rebooting my machine!!

what help I'm looking for :

  • set env vars correctly

  • run sqlplus

Same question exists superuser, but no solution is given there.

  • and there is the libsqlplus.so file located? try to find it with "sudo updatedb && locate libsqlplus.so" - then please tell us if you found it! – Wolfgang Feb 13 '14 at 14:37
  • @WolfgangVogl : hi...thankx for ur response, on executing ur command i got this : /usr/lib/oracle/12.1/client/lib/libsqlplus.so – user246631 Feb 13 '14 at 14:40
  • @WolfgangVogl : here is permission chekc result on so file => ls -l /usr/lib/oracle/12.1/client/lib/libsqlplus.so -rw-r--r-- 1 root root 1303050 May 27 2013 /usr/lib/oracle/12.1/client/lib/libsqlplus.so – user246631 Feb 13 '14 at 14:43
  • 1
    Check out this link for detailed steps with screenshot. – Aniket Thakur Sep 3 '15 at 18:47
17

As seen in the comments your Library is located at /usr/lib/oracle/12.1/client/lib/, but your path just includes /usr/lib/oracle/12.1/client/bin... you see why it can't find the library?

You can expand your LD_LIBRARY_PATH with the /usr/lib/oracle/12.1/client/lib/ directory (in your .profile or .environment or .bash_profile or (if you want it for all users) in the /etc/bash.bashrc file) - i don't know if sqlplus takes care of the LD_LIBRARY_PATH - just have a try.

To see to what LD_LIBRARY_PATH is set you have to type:

echo $LD_LIBRARY_PATH

(note the $ if you want to read the value!)

Hope this helps!

  • hi..i really appreciate you taking out time for this, i updated $LD_LIBRARY_PATH to /usr/lib/oracle/12.1/client/lib/ and then ran sqlplus but still same error!! :( – user246631 Feb 13 '14 at 15:49
  • 1
    there was a lib libaio1 missing too...had too sudo upgrade after your solution...now solved...yeyeyeye!! :D – user246631 Feb 13 '14 at 15:52
1

There are some files under the /usr/lib/oracle/12.1/client/lib/ directory which are not readable by other groups.

cd /usr/lib/oracle/12.1/client/lib/
chmod +r *

Then it works in my environment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.