Install ROracle on Linux

There are a lot of guides/stackoverflow questions related to installing Oracle Instant Client and ROracle on Linux. I had to combine multiple sources to get it working.

The guide uses the as of writing current version 12.1, change the version numbers below if you live in the future.

Here is the end-to-end process I took:

1. Installing Oracle Instant Client and setting up the environment

  • install alien for rpm conversion & libaio
sudo apt-get install alien
sudo apt-get install libaio1
  • go here:

  • Create an account (Oracle needs to know your shoesize…)
  • Download:


  • optionally also:


  • cd into where you downloaded the files and for debian-based (like ubuntu) systems convert rpm and then install:
sudo alien -i oracle-instantclient12.1-basic-
sudo alien -i oracle-instantclient12.1-devel-
sudo alien -i oracle-instantclient12.1-jdbc-
sudo alien -i oracle-instantclient12.1-odbc-
sudo alien -i oracle-instantclient12.1-sqlplus-
  • add paths to your config & source them:
export LD_LIBRARY_PATH=/usr/lib/oracle/12.1/client64/lib/${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}
export ORACLE_HOME=/usr/lib/oracle/12.1/client64
  • add the path to oracle.conf & update cache
echo "/usr/lib/oracle/12.1/client64/lib" | sudo tee /etc/
sudo ldconfig -v
  • test if paths are set and you see the tools:
echo $PATH
sqlplus   # should give you the command prompt

2. Installing ROracle

sudo R CMD INSTALL --configure-args='--with-oci-lib=/usr/lib/oracle/12.1/client64/lib --with-oci-inc=/usr/include/oracle/12.1/client64' ROracle_1.2-2.tar.gz

Congratulations, we made it!



One thought on “Install ROracle on Linux

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s