LoginSignup
0
0

More than 3 years have passed since last update.

sqlplus: command not foundとなったときの対応方法

Posted at
  • 環境
    • Ubuntu Server 18.04.3 LTS 64bit(EC2インスタンス)

事象 : SQL*Plusをインストールしたはずなのにないと言われている

# インストールしたはずなのに
$ sudo dpkg -i oracle-instantclient12.2-basiclite_12.2.0.1.0-2_amd64.deb oracle-instantclient12.2-sqlplus_12.2.0.1.0-2_amd64.deb 
Selecting previously unselected package oracle-instantclient12.2-basiclite.
(Reading database ... 157738 files and directories currently installed.)
Preparing to unpack oracle-instantclient12.2-basiclite_12.2.0.1.0-2_amd64.deb ...
Unpacking oracle-instantclient12.2-basiclite (12.2.0.1.0-2) ...
Selecting previously unselected package oracle-instantclient12.2-sqlplus.
Preparing to unpack oracle-instantclient12.2-sqlplus_12.2.0.1.0-2_amd64.deb ...
Unpacking oracle-instantclient12.2-sqlplus (12.2.0.1.0-2) ...
Setting up oracle-instantclient12.2-basiclite (12.2.0.1.0-2) ...
Setting up oracle-instantclient12.2-sqlplus (12.2.0.1.0-2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...

# ないと言われている
$ sqlplus -version
sqlplus: command not found
$ which sqlplus
$

原因 : 64bit用はsqlplusではなくsqlplus64だから

64ビットバージョンをインストールした場合、クライアントはsqlplus64と呼ばれることに注意してください。
SqlPlusのインストール方法

対応方法 : sqlplus64を使う

$ which sqlplus64
/usr/bin/sqlplus64
# まだ設定していないのでエラーになる
$ sqlplus64 -version
sqlplus64: error while loading shared libraries: libsqlplus.so: cannot open shared object file: No such file or directory
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0