Skip to content

Instantly share code, notes, and snippets.

@bmaupin
Last active July 22, 2026 20:17
Show Gist options
  • Select an option

  • Save bmaupin/1d376476a2b6548889b4dd95663ede58 to your computer and use it in GitHub Desktop.

Select an option

Save bmaupin/1d376476a2b6548889b4dd95663ede58 to your computer and use it in GitHub Desktop.
Install Oracle client on Ubuntu

Reference: https://help.ubuntu.com/community/Oracle%20Instant%20Client

Note

This was last updated for Ubuntu 24.04

  1. Decide which version of the Oracle client to install

  2. Download the Oracle client packages

  3. Install prerequisites

    sudo apt install alien libaio1t64
    

    For older versions of Ubuntu:

    sudo apt install alien libaio1
    
  4. Create symlink from libaio.so.1 to libaio.so.1t64

    ⓘ This is only needed if you installed the libaio1t64 package; newer versions of Ubuntu don't have libaio.so.1t64 but the Oracle client looks for libaio.so.1 (source)

    sudo ln -s /usr/lib/x86_64-linux-gnu/libaio.so.1t64 /usr/lib/x86_64-linux-gnu/libaio.so.1
    
  5. Install the Oracle client package(s)

    sudo alien -i oracle-instantclient-basiclite-21.22.0.0.0-1.x86_64.rpm
    
  6. Make sure the libraries were installed system-wide, e.g.

    $ ldconfig -p | grep libclntsh
    	libclntshcore.so.21.1 (libc6,x86-64) => /usr/lib/oracle/21/client64/lib/libclntshcore.so.21.1
    	libclntshcore.so (libc6,x86-64) => /usr/lib/oracle/21/client64/lib/libclntshcore.so
    	libclntsh.so.21.1 (libc6,x86-64) => /usr/lib/oracle/21/client64/lib/libclntsh.so.21.1
    	libclntsh.so (libc6,x86-64) => /usr/lib/oracle/21/client64/lib/libclntsh.so
    
  7. If the libraries aren't installed, you can update the system library path to include the oracle libraries

    ⓘ This is only necessary if the previous command didn't return anything

    sudo sh -c 'echo /usr/lib/oracle/21/client64/lib/ > /etc/ld.so.conf.d/oracle.conf'
    sudo ldconfig
    
@cjbj

cjbj commented Apr 29, 2025

Copy link
Copy Markdown

Use alien -i --scripts ... and then you won't need to manually update ld.so.conf.d/*

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment