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

前端 未结 12 1120
忘掉有多难
忘掉有多难 2021-02-04 02:57

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

sqlplus /nolog

the error that occurred:

 sqlplus:          


        
相关标签:
12条回答
  • 2021-02-04 03:15

    You should already have all needed variables in /etc/profile.d/oracle.sh. Make sure you source it:

    $ source /etc/profile.d/oracle.sh

    The file's content looks like:

    ORACLE_HOME=/usr/lib/oracle/11.2/client64
    PATH=$ORACLE_HOME/bin:$PATH
    LD_LIBRARY_PATH=$ORACLE_HOME/lib
    export ORACLE_HOME
    export LD_LIBRARY_PATH
    export PATH
    

    If you don't have it, create it and source it.

    0 讨论(0)
  • 2021-02-04 03:15

    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.

    0 讨论(0)
  • 2021-02-04 03:17

    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
    ...
    
    0 讨论(0)
  • 2021-02-04 03:17
    sudo sh -c "echo /usr/lib/oracle/12.2/client64/lib > /etc/ld.so.conf.d/oracle-instantclient.conf";sudo ldconfig
    

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

    0 讨论(0)
  • 2021-02-04 03:23

    I did solve this error by setting

    export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib:$ORACLE_HOME
    

    yes, not only $ORACLE_HOME/lib but $ORACLE_HOME too.

    0 讨论(0)
  • 2021-02-04 03:24

    Don't forget

    apt-get install libaio1 libaio-dev
    

    or

    yum install libaio
    
    0 讨论(0)
提交回复
热议问题