sqlplus: error while loading shared libraries: lib

2020-05-26 09:50发布

Please suggest a solution for solving this issue?? While giving the command:

sqlplus /nolog

the error that occurred:

 sqlplus: error while loading shared libraries:
 libsqlplus.so: cannot open shared object file: No such file or directory

12条回答
爷、活的狠高调
2楼-- · 2020-05-26 09:58

You can try usage:

# echo "/usr/lib/oracle/12.2/client64/lib" > /etc/ld.so.conf.d/oracle.conf
# ldconfig

This problem are because oracleinstant client not configure shared library.

查看更多
爱情/是我丢掉的垃圾
3楼-- · 2020-05-26 10:01

PERMISSIONS: I want to stress the importance of permissions for "sqlplus".

  1. For any "Other" UNIX user other than the Owner/Group to be able to run sqlplus and access an ORACLE database , read/execute permissions are required (rx) for these 4 directories :

    $ORACLE_HOME/bin , $ORACLE_HOME/lib, $ORACLE_HOME/oracore, $ORACLE_HOME/sqlplus

  2. Environment. Set those properly:

    A. ORACLE_HOME (example: ORACLE_HOME=/u01/app/oranpgm/product/12.1.0/PRMNRDEV/)

    B. LD_LIBRARY_PATH (example: ORACLE_HOME=/u01/app/oranpgm/product/12.1.0/PRMNRDEV/lib)

    C. ORACLE_SID

    D. PATH

     export PATH="$ORACLE_HOME/bin:$PATH"
    
查看更多
手持菜刀,她持情操
4楼-- · 2020-05-26 10:01

Don't forget

apt-get install libaio1 libaio-dev

or

yum install libaio
查看更多
霸刀☆藐视天下
5楼-- · 2020-05-26 10:07

@laryx-decidua: I think you are only seeing the 18.x instant client releases that are in the ol7_oci_included repo. The 19.x instant client RPMs, at the moment, are only in the ol7_oracle_instantclient repo. Easiest way to access that repo is:

yum install oracle-release-el7

查看更多
小情绪 Triste *
6楼-- · 2020-05-26 10:09

The minimum configuration to properly run sqlplus from the shell is to set ORACLE_HOME and LD_LIBRARY_PATH. For ease of use, you might want to set the PATH accordingly too.

Assuming you have unzipped the required archives in /opt/oracle/instantclient_11_1:

$ export ORACLE_HOME=/opt/oracle/instantclient_11_1
$ export LD_LIBRARY_PATH="$ORACLE_HOME"
$ export PATH="$ORACLE_HOME:$PATH"

$ sqlplus

SQL*Plus: Release 11.1.0.7.0 - Production on Wed Dec 31 14:06:06 2014
...
查看更多
Lonely孤独者°
7楼-- · 2020-05-26 10:09

It means you didn't set ORACLE_HOME and ORACLE_SID variables. Kindly set proper working $ORACLE_HOME and $ORACLE_SID and after that execute sqlplus /nolog command. It will be working.

查看更多
登录 后发表回答