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

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?
LVL 16
Richard OlutolaConsultantAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

lumolnarCommented:
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)

or

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

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.

--d.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sathyagiriCommented:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$ORACLE_HOME/lib

Then connect usi ng sqlplus
0
earth man2Commented:
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.
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

earth man2Commented:
$ 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
0
Richard OlutolaConsultantAuthor Commented:
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.
Richard.
0
earth man2Commented:
I think everyone is expected to use client developer software.
HOW ?
chown oracle:oracle XXX
chmod g+rx XXX
chmod g-w XXX
0
Richard OlutolaConsultantAuthor Commented:
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?

Thanks.
Richard.
0
dalebettsCommented:
test
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.