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:
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
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.