运行 sqlplus 命令时没有该文件或目录

运行 sqlplus 命令时没有该文件或目录

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 2021年4月16日 sqlplus

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

-bash:/usr/lib/oracle/19.10/client64/bin/sqlplus:没有此文件或目录

sqlplus 文件在那里,但 Ubuntu 找不到它。我已经使用 alien 安装了所有 oracle (rem) 包(首先转到 .tgz,因为直接转到 deb 不起作用),libaio1 包并设置 LD_LIBRARY_PATH 和 PATH 以包含客户端文件夹。我遗漏了什么?

答案1

您需要更改解释器:

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

相关内容