Fix all your “cannot open shared object file” problems in Linux

After installing Oracle XE on Linux, and especially Ubuntu, you might find yourself with issues opening SQL*Plus and other tools.

“sqlplus: error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory”

There are many possible reasons for that, so check the following:

Set your paths correctly

Perform the commands:

oracle@VirtualBox:~$ echo $ORACLE_HOME
/home/oracle/app/oracle/product/11.2.0/dbhome_1
oracle@VirtualBox:~$  echo $LD_LIBRARY_PATH
/home/oracle/app/oracle/product/11.2.0/dbhome_1/lib

If these are empty, go to your Oracle home and enter:

sudo ./root.sh

This wil set all the environment variables. Sometimes you get the error

./root.sh: 1: /home/oracle/app/oracle/product/11.2.0/dbhome_1/install/utl/rootmacro.sh: /bin/awk: not found
./root.sh: 1: /home/oracle/app/oracle/product/11.2.0/dbhome_1/install/utl/rootmacro.sh: /bin/awk: not found
./root.sh: 127: [: !=: unexpected operator

When this happens, enter “which awk”  to find the path where awk is located, edit the file <Oracle_home>/install/utl/rootmacro.sh, look for the line
AWK=/bin/awk
And replace the path with the output from the “which awk” command.

Now all your paths and environment settings should be correct.

If not, this might me a good time to reinstall the database software. Chances are some files are corrupted.

Laat een reactie achter

Je e-mailadres wordt niet gepubliceerd. Vereiste velden zijn gemarkeerd met *

Deze site gebruikt Akismet om spam te verminderen. Bekijk hoe je reactie-gegevens worden verwerkt.

By using this site you acknowledge the use of cookies (which are mostly harmless, btw) More information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below you are agreeing to these settings.

Close