3

root@instance-20220315-0833:/usr/lib/oracle/19.10/client64/bin# ls

adrci genezi sqlplus

root@instance-20220315-0833:/usr/lib/oracle/19.10/client64/bin# ls -al sqlplus

-rwxrwxrwx 1 root root 72384 Apr 16 2021 sqlplus

root@instance-20220315-0833:/usr/lib/oracle/19.10/client64/bin# sqlplus

-bash: /usr/lib/oracle/19.10/client64/bin/sqlplus: No such file or directory

The sqlplus file is there, but Ubuntu is not finding it. I have installed all the oracle (rem) packages using alien (going to .tgz first as directly to deb wouldn't work), the libaio1 package and set LD_LIBRARY_PATH and PATH to include the client folder. What am I missing?

3
  • Does this answer your question? How to install SqlPlus? Commented Mar 15, 2022 at 20:31
  • 1
    I'm getting the very same using an Oracle OCI VM on aarch64, did you ever resolve it? Commented Oct 21, 2022 at 17:07
  • @EraserheadIRL Sadly not, I ended up just using a postgresql database on the machine Commented Oct 25, 2022 at 7:34

1 Answer 1

3

You need to change the interpreter:

mkdir -p /opt/oracle
cd /opt/oracle
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-basic-linux-arm64.zip
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-sqlplus-linux-arm64.zip
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-tools-linux-arm64.zip
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-sdk-linux-arm64.zip
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-jdbc-linux-arm64.zip
curl -LJO https://download.oracle.com/otn_software/linux/instantclient/instantclient-odbc-linux-arm64.zip

unzip instantclient-basic-linux-arm64.zip
unzip instantclient-sqlplus-linux-arm64.zip
unzip instantclient-tools-linux-arm64.zip
unzip instantclient-sdk-linux-arm64.zip
unzip instantclient-jdbc-linux-arm64.zip
unzip instantclient-odbc-linux-arm64.zip
rm *.zip

sh -c "echo /opt/oracle/instantclient_19_10 > /etc/ld.so.conf.d/oracle-instantclient.conf"
ldconfig

apt -y install patchelf
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/sqlplus
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/adrci
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/exp
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/expdp
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/genezi
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/imp
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/impdp
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/sqlldr
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/sqlplus
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/uidrvci
patchelf --set-interpreter /lib/ld-linux-aarch64.so.1 instantclient_19_10/wrc
2
  • Fantastic answer, can conform it worked for me on ubuntu oci instance. Would you mind explaining why this is necessary and what it does?
    – starfry
    Commented Jan 30, 2023 at 19:57
  • I can confirm this also appears to work for Debian 11 running in a Docker container (ddev) on Apple M1 chip. I too would like to know why this is necessary and why Oracle doesn't seem to know about it.
    – JonMcL
    Commented Mar 10, 2023 at 15:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .