LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-24-2013, 03:36 PM   #1
casperdaghost
Member
 
Registered: Aug 2009
Posts: 349

Rep: Reputation: 16
runing script in cron - no shared libraries


getting error on a script when running from cron
Code:
error while loading shared libraries: libclntsh.so.11.1: cannot open shared object file: No such file or directory
I do not get the error when i run it from command line.


So I do locate command on the library and found it:

Code:
locate  - /export/home/orahome/11.2/lib/libclntsh.so.11.1
and add it to the path in the script, but still get an error.

Code:
#!/bin/bash
export PATH=/opt/OV/bin/OpC:/usr/local/sqlite3.6.23.1/bin:/production/java/jdk32/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin:/usr/local/svn/bin:/orahome/current/bin:/production/
fo/bin:/production/fo/scr:/production/fo/tools:/export/home/orahome/11.2/lib/

/production/bin/userStats -c /production/cfg/userStats.cfg > /production/log/userStats.log 2>&1
but still get an error in the logs

Code:


casper@casperbox:/production/fo> ls -ltr /production/log/userStats.log
-rw-r--r-- 1 casper casper  145 Oct 24 16:24 /production/log/userStats.log

icapfo@usprvauth01s:/production/fo> more /production/log/userStats.log

/production/bin/userStats: error while loading shared libraries: libclntsh.so.11.1: 
cannot open shared object file: No such file or directory
 
Old 10-24-2013, 06:03 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Paths are searched in order for something and different subsystems / tools have different paths: for example executables are searched for in PATH, 'man' wants MANPATH and the dynamic linker wants LD_LIBRARY_PATH. Do run 'ldd' on the userStats binary to see if all its dependencies reside in regular locations or the LD_LIBRARY_PATH you intend to use.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libgda-4.0.so.4: cannot open shared object file mahesh1234 Linux - Newbie 2 10-22-2013 11:06 PM
error while loading shared libraries: libcrypt.so.1: cannot open shared object file: xmixail Linux - Kernel 15 07-29-2012 08:39 PM
[SOLVED] Script not runing from cron kais1 Linux - Newbie 11 04-20-2012 09:24 AM
top: error while loading shared libraries: libproc.so.2.0.6: cannot open shared objec ramesh_india2020 Linux - Newbie 6 07-29-2010 01:49 PM
runing sh script in cron job emymcse Linux - General 3 12-28-2009 07:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration