Search This Blog

Total Pageviews

Thursday 14 July 2011

libclntsh.so.10.1: cannot open shared object file: No such file or directory

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

error

One moment please...
err: ERROR Unable to check database.
err: Error description: Database access error. Reason Loading shared object failed. First tried to load library clntsh and failed because of error: [clntsh: cannot open shared object file: No such file or directory]. Second tried to load library libclntsh.so and failed because of error: [libclntsh.so: cannot open shared object file: No such file or directory].
Please press Enter to continue...




===
# .bash_profile


export ORACLE_HOME=/opt/app/oracle/product/10.2
export LANG=en_US.utf8
export LC_ALL=en_US.utf8


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

# or 32bit lib path
# export LD_LIBRARY_PATH=/lib:/usr/lib:/usr/local/lib:$ORACLE_HOME/lib32:

# LD_LIBRARY_PATH=$ORACLE_HOME/lib

#Get the aliases and functions

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

#PATH=$PATH:$HOME/bin

#export PATH

export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/lib:$PATH:$HOME/bin

===

Try to connect sqlplus from different user

[bobjxi@apt-jtime-01 ~]$ sqlplus
sqlplus: error while loading shared libraries: libclntsh.so.10.1: cannot open shared object file: No such file or directory


ldd /home/oracle/oracle/product/10.2.0/lib32/libclntsh.so.10.1



[bobjxi@apt-jtime-01 lib]$




-rwxr-x--- 1 oracle dba 18451220 Jul 13 16:18 libclntsh.so.10.1
-rw-r----- 1 oracle dba 3093860 Jul 13 16:18 clntsh.map
lrwxrwxrwx 1 oracle dba 50 Jul 13 16:18 libclntsh.so -> /opt/app/oracle/product/10.2/lib/libclntsh.so.10.1
[bobjxi@apt-jtime-01 lib]$ ldd libclntsh.so
ldd: error: you do not have read permission for `./libclntsh.so'

[bobjxi@apt-jtime-01 lib]$ ldd libclntsh.so
ldd: error: you do not have read permission for `./libclntsh.so'


permission problem

-rw-r----- 1 oracle oinstall 3104536 Jul 13 16:18 libn10.a
-rwxr-x--- 1 oracle dba 18451220 Jul 13 16:18 libclntsh.so.10.1 <<<<<<< change the group dba to oinstall
-rw-r----- 1 oracle dba 3093860 Jul 13 16:18 clntsh.map
lrwxrwxrwx 1 oracle dba 50 Jul 13 16:18 libclntsh.so -> /opt/app/oracle/product/10.2/lib/libclntsh.so.10.1 <<<<<<< change the group dba to oinstall


because my user id is oinstall

[bobjxi@apt-jtime-01 ~]$ id
uid=7020(bobjxi) gid=1020(bobjxi) groups=1004(oinstall),1020(bobjxi)

to change the link group ...

chgrp -h oinstall libclntsh.so

1 comment:

Anuj Singh said...

[root@apt-jtime-01 lib]# chgrp -h oinstall libclntsh.so

Oracle DBA

anuj blog Archive