I tried installing sqlplus by following the instruction from here. I'm still getting :
sqlplus: command not found
when I do sqlplus
from my terminal.
I'm an novice in Ubuntu and I use Ubuntu 12.04.
I tried installing sqlplus by following the instruction from here. I'm still getting :
sqlplus: command not found
when I do sqlplus
from my terminal.
I'm an novice in Ubuntu and I use Ubuntu 12.04.
First of all you need to download Instant Client Downloads. Install alien package so you can install rpm packages by typing following command in terminal.
Once that is done, go to the folder where the rpm files are located and execute the following:
You need to install
libaio.so
. Type following command to do it:Create Oracle configuration file:
Put this line in that file:
Note - for 64-bit installations, the path will be:
Update the configuration by running following command:
Try to connect using:
or:
Note that if you installed the 64-bit version, the client is called
sqlplus64
.The alien thing didn't work because of:
Fortunately, there is a more native solution:
Download the zip files from Oracle, you need
The archives extract into the same root folder. Put that folder where you put program files (e.g.
/usr/share
or$HOME/bin
).Then create a script that runs the executable after setting the
LD_LIBRARY_PATH
variable, so that libraries are found:Call it
sqlplus
, make it executable (chmod 755 sqlplus
) and put it into a directory on yourPATH
(e.g./usr/bin/
), so that bash finds it.That's it, now you can run sqlplus like:
If it gives you:
you need to install the missing library with
sudo apt-get install libaio1
I think this link would help. It is pretty descriptive. Make sure you follow all the steps. Still if you have any problems, don't hesitate to comment.
Of course the correct installation is from official packages like above (download Instant Client Downloads), but you can get a full working sqlplus just by copying these files (you can found it in any computer with oracle client installed), and some msb are optitional:
As aditional dependency, I did include
libaio.so
- it can be installed withsudo apt-get install libaio1
So, a sample use can be:
Just as an addendum to @Ketan Patel's great answer:
This simple script, kept together with downloaded rpm files, autpmates the process for futher installs:
Edit: Here it is an ehanced version with readline wrapping (credists for this post):
It's still Oracle, but at least it makes the pain a little bit more bearable...