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

Posted on 2007-08-17
Medium Priority
Last Modified: 2013-12-16
I have created a user for the developers on the database server to run processes to import into the database.
However, when they try to run sqlplus the hit error message.
I know it is caused by lack of permissions. I have made the use a member of the oinstall group. However, this is not desirable.
Is there a way to grant permissions to the right libraries only or is it better to have a client on a separate machine all togerther?
Question by:Richard Olutola

Accepted Solution

lumolnar earned 300 total points
ID: 19715955
i think you should add path where oracle libraries resides into /etc/ld.so.conf (newline separated list of directories)
and run ldconfig -v (as root) to rebuild library cache file

then try run sqlplus (as developer)


add path where oracle libraries resides into LD_LIBRARY_PATH env variable (for your developers to their
export LD_LIBRARY_PATH=/path/to/oralibraries

here i have LD_LIBRARY_PATH=/ccbdevd1_oracle10g/product/10.1.0/lib

when you can't open shared object file,
you should get: Permission denied not No such file or directory.

LVL 14

Assisted Solution

sathyagiri earned 150 total points
ID: 19717879

Then connect usi ng sqlplus
LVL 22

Assisted Solution

by:earth man2
earth man2 earned 300 total points
ID: 19718045
I've gone through exactly the same thing this week.

I wanted to create a group oracle for developers to use.  Default install sets ownership of oracle installation to dba ( or oinstall is your case).

To make it work I had to set ownership of many directories and files to oracle:oracle with group read/execute permissions set.

I used strace to work out where each problem was if it was not clear from the error messages.  Annoying - huh.

Don't forget to

relink all.
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

LVL 22

Expert Comment

by:earth man2
ID: 19723834
$ ls -lR * 2>null | grep "oracle oracle"
-rwxrwx--- 1 oracle oracle   1965258 Jan 24  2007 orabase
-rw-r----- 1 oracle oracle      6766 Aug 12 23:52 sqlplus
drwxrwx---   3 oracle oracle 4096 Aug 12 12:16 ContentsXML
-rw-rw---- 1 oracle oracle 380076 Aug 12 12:16 comps.xml
-rw-rw---- 1 oracle oracle   1978 Aug 12 12:16 config.xml
drwxrw---- 2 oracle oracle   4096 Aug 12 13:07 ConfigXML
-rw-rw---- 1 oracle oracle   6561 Aug 12 12:16 libs.xml
-rw-rw---- 1 oracle oracle    481 Aug 12 12:16 oraclehomeproperties.xml
-rw-rw---- 1 oracle oracle   7668960 Jun 25 23:13 libnnz11.a
-rw-rw---- 1 oracle oracle   5839373 Jun 25 23:20 libnnz11.so
-rw-rw---- 1 oracle oracle     45632 Jul 25 04:41 libnque11.so
-rw-rw---- 1 oracle oracle   5024944 Aug  1 15:32 libocci11.a
-rw-rw---- 1 oracle oracle    129285 Jul 25 08:43 libocijdbc11.so
-rw-rw---- 1 oracle oracle   1118747 Jul 25 01:10 libsqlplus.so
drwxrwx--- 3 oracle oracle 4096 Aug 12 12:55 admin
drwxrwx--- 2 oracle oracle 4096 Aug 12 12:13 mesg
-rw-r----- 1 oracle oracle  343 Aug 12 12:16 listener.ora
-rw-r----- 1 oracle oracle  186 Aug 12 12:16 sqlnet.ora
-rw-r----- 1 oracle oracle  338 Aug 12 12:55 tnsnames.ora
-rw-rw---- 1 oracle oracle  47104 Jul 25 04:46 tnsus.msb
-rw-rw---- 1 oracle oracle 245274 Jul 25 04:46 tnsus.msg
drwxrwx--- 3 oracle oracle 12288 Aug 12 12:11 data
drwxrwx--- 2 oracle oracle 4096 Aug 12 12:11 zoneinfo
-rw-rw---- 1 oracle oracle 408315 Jul 24 03:22 timezlrg.dat
drwxrwx--- 2 oracle oracle  4096 Aug 12 12:12 mesg
-rw-rw---- 1 oracle oracle   25088 Aug  1 15:33 ocius.msb
-rw-rw---- 1 oracle oracle  122132 Feb 15  2005 ocius.msg
-rw-rw---- 1 oracle oracle  991744 Aug  1 15:33 oraus.msb
-rw-rw---- 1 oracle oracle 4398532 Aug  1 15:33 oraus.msg
drwxrwx--- 3 oracle oracle 4096 Aug 12 12:11 admin
drwxrwx--- 2 oracle oracle 4096 Aug 12 12:11 doc
drwxrwx--- 2 oracle oracle 4096 Aug 12 23:52 lib
drwxrwx--- 2 oracle oracle 4096 Aug 12 12:11 mesg
-rw-rw---- 1 oracle oracle  342 Jan 12  2006 glogin.sql
drwxrwx--- 2 oracle oracle 4096 Aug 12 12:11 help
-rw-rw---- 1 oracle oracle  226 Jul 25 01:10 libsqlplus.def
-rw-rw---- 1 oracle oracle  813 Mar  7  2006 plustrce.sql
-rw-rw---- 1 oracle oracle 2118 Feb 16  2003 pupbld.sql
-rw-rw---- 1 oracle oracle   265 Feb 16  2003 helpbld.sql
-rw-rw---- 1 oracle oracle   337 Jun 28  2000 helpdrop.sql
-rw-rw---- 1 oracle oracle 64989 Jun 25 19:52 helpus.sql
-rw-rw---- 1 oracle oracle  1494 Mar 16  2003 hlpbld.sql
-rw-rw---- 1 oracle oracle   866 Jun 19 21:40 cpyr.htm
-rw-rw---- 1 oracle oracle  3986 Aug  3  2006 elgsetup.txt
-rw-rw---- 1 oracle oracle  2122 Mar  6  2002 oracle.gif
-rw-rw---- 1 oracle oracle 13128 Jun 19 21:40 README.htm
-rw-rw---- 1 oracle oracle 50957 Jul 25 01:11 env_sqlplus.mk
-rw-rw---- 1 oracle oracle  1325 Jul 25 01:11 ins_sqlplus.mk
-rw-rw---- 1 oracle oracle  2388 Jul 25 01:10 s0afimai.o
-rw-rw---- 1 oracle oracle   4096 Jul 25 01:10 cpyus.msb
-rw-rw---- 1 oracle oracle   4369 Dec  4  2002 cpyus.msg
-rw-rw---- 1 oracle oracle  11776 Jul 25 01:10 sp1us.msb
-rw-rw---- 1 oracle oracle  17957 Jun 26  2006 sp1us.msg
-rw-rw---- 1 oracle oracle  33792 Jul 25 01:10 sp2us.msb
-rw-rw---- 1 oracle oracle 134081 Dec 10  2006 sp2us.msg
LVL 16

Author Comment

by:Richard Olutola
ID: 19751659
Apologies guys. All experts-exchange emails have been trapped in my junk maikbox and I only just discovered then this morning.

lumolnar, your second option hasn't worked for me. sathyagiri, I guess this applies to you too.

earthman2, I'm not sure about your method. I'll look into it more closely. Surely, Oracle must have thought about this and provide a graceful method of achieving it!

What group can this developer belong to? Is it OK to have him in his own group?

Thanks guys for your help.
LVL 22

Expert Comment

by:earth man2
ID: 19751996
I think everyone is expected to use client developer software.
chown oracle:oracle XXX
chmod g+rx XXX
chmod g-w XXX
LVL 16

Author Comment

by:Richard Olutola
ID: 19752160
I have now now installed a client on a separate server where teh developers can work. I initially tried walking through the errors, changing permissions on teh folders and then files per the error. These include /lib/libsqlplus.so, /lib.libclntsh.so, lib/libnnz1io.so with permissions of 644. Then sqlplus/mesg/sp1us.msb, sp2us.msb.
After all this, it now returned SP2-1503: Unable to initialise Oracle Call Interface. I gave up at this point as I haven't got any spare time left.

It does however have to do with file permissions because adding the developer to the oinstall group resolves all this.

It appears that Oracle has a mechanism for achieving what we've been trying to do however. Has anyone ever implemented the OSOPER group (oper)? It appears this was designed for this purpose. See as follows:

The OSOPER group (oper)
This is an optional group. Create this group if you want a separate group of
operating system users to have a limited set of database administrative privileges
(the SYSOPER privilege). By default, members of the OSDBA group also have the
SYSOPER privilege.
If you want to specify a separate OSOPER group, other than the default dba
group, then you must choose the Custom installation type to install the software
or start Oracle Universal Installer as a user that is not a member of the dba group.
In this case, Oracle Universal Installer prompts you to specify the name of this
group. The usual name chosen for this group is oper.

What do you guys think?


Expert Comment

ID: 20525410

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to Unravel a Tricky Query Introduction If you browse through the Oracle zones or any of the other database-related zones you'll come across some complicated solutions and sometimes you'll just have to wonder how anyone came up with them.  …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses
Course of the Month12 days, 18 hours left to enroll

578 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question