Reputation: 683
Most information found even on the client's homepage is somehow inaccurate or outdated. This is the straight-foward method that worked for me, and I'd like to share with you.
It would be nice if this answer can be expanded by some other system specific methods that might be harder to get it installed on.
Upvotes: 2
Views: 6604
Reputation: 1039
These are the steps to install ruby-oci8 Gem Installation in Ubuntu.
Step 1: Download the basic & sdk instantclient zip files from https://www.oracle.com/database/technologies/instant-client/linux-x86-64-downloads.html
instantclient-basic-linux.x64-21.8.0.0.0dbru.zip
instantclient-sdk-linux.x64-21.8.0.0.0dbru.zip
Step 2: Install following packages
sudo apt-get install build-essential
sudo apt-get install libaio-dev
Step 3:
Create a folder oracle inside /opt/
mkdir /opt/oracle
Step 4:
Go to inside /opt/oracle/
cd /opt/oracle
Step 5:
Place the basic instantclient folder inside /opt/oracle
sudo cp ~/Downloads/instantclient-basic-linux.x64-21.8.0.0.0dbru.zip /opt/oracle/
Step 6:
Place the sdk instantclient folder inside /opt/oracle
sudo cp ~/Downloads/instantclient-sdk-linux.x64-21.8.0.0.0dbru.zip /opt/oracle/
Step 7: Unzip the basic instantclient folder
sudo unzip instantclient-basic-linux.x64-21.8.0.0.0dbru.zip
Step 8: Unzip the sdk instantclient folder
sudo unzip instantclient-sdk-linux.x64-21.8.0.0.0dbru.zip
Step 9:
Check the folders inside /opt/oracle/
. It should now have a folder named as instantclient_21_8
Step 10: Update the runtime link path
sudo sh -c "echo /opt/oracle/instantclient_21_8 > \
> /etc/ld.so.conf.d/oracle-instantclient.conf"
Step 11:
Check the runtime link path, It should now return /opt/oracle/instantclient_21_8
cat /etc/ld.so.conf.d/oracle-instantclient.conf
Step 12: Set the path in env
export LD_LIBRARY_PATH=/opt/oracle/instantclient_21_8:$LD_LIBRARY_PATH
Step 13:
Check the path if set properly in env. It should now have proper value set as LD_LIBRARY_PATH=/opt/oracle/instantclient_21_8:/opt/instantclient
env | grep LD_LIBRARY_PATH
Step 14: Now try by installing the gem ruby-oci8
gem install ruby-oci8
It should work now.
Upvotes: 1
Reputation: 683
Oracle ruby-oci8 Installing in Ubuntu LTS 12.04 32bit Updated to 64bit version. Thx OneHoopyFrood
First, internal requirements
sudo apt-get install build-essential
sudo apt-get install libaio-dev
Download oracle instant client from
http://www.oracle.com/technetwork/topics/linuxsoft-082809.html
http://www.oracle.com/technetwork/topics/linuxx86-64soft-092277.html
You’ll need both zip files, instantclient-basic AND instantclient-sdk
on your machine, make yourself root (sudo su) and make the destination folders:
mkdir /opt
mkdir /opt/oracle
cd /opt/oracle
put both files inside /opt/oracle and unzip them.
unzip instantclient-basic*
unzip instantclient-sdk*
make a symlink of instantclient for easier finding by the system
cd /opt/oracle/instantclient10_1
ln -s libclntsh.so.10.1 libclntsh.so
Now, export the LD_LIBRARY_PATH pointing to instantclient path.
export LD_LIBRARY_PATH=/opt/instantclient
NOW… you can install ruby-oci8
a. if using RVM, use:
gem install ruby-oci8
b.- if installing to system, use:
sudo gem install ruby-oci8
Hope it helps.
Upvotes: 10