I recently had to work on a project that was pulling data from an Oracle database. While there are many tutorials on installing the relevant drivers, I needed a simple setup that would work across multiple programming languages. Here are the instructions for installing the latest Oracle drivers on Ubuntu 18.04 and above:
sudo mkdir -p /opt/oracle cd /opt/oracle sudo mv ~/Downloads/instantclient-basic-linux.x64-18.104.22.168.0dbru.zip . sudo mv ~/Downloads/instantclient-sdk-linux.x64-22.214.171.124.0dbru.zip . sudo unzip instantclient-basic-linux.x64-126.96.36.199.0dbru.zip sudo unzip instantclient-sdk-linux.x64-188.8.131.52dbru.zip
sudo apt install libaio
sudo sh -c "echo /opt/oracle/instantclient_18_3 > /etc/ld.so.conf.d/oracle-instantclient.conf" sudo ldconfig
sqlnet.ora, etc., with the instant client. Create the following directory and put them in there:
mkdir -p /opt/oracle/instantclient_18_3/network/admin
The above should be enough to allow you to install the relevant drivers for your programming language environment and get coding. Finally, note that Version 18 and 12.2 client libraries can connect to Oracle Database 11.2 or greater. Version 12.1 client libraries can connect to Oracle Database 10.2 or greater. Version 11.2 client libraries can connect to Oracle Database 9.2 or greater.
Maximum credit for this tutorial goes to the python cx_oracle module installation documentation!
Back to the article list.
Subscribe to get articles as they are published direct to your inbox!