"ld.so.1" error using a cron job | works fine otherwise


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting "ld.so.1" error using a cron job | works fine otherwise
# 1  
Old 08-25-2009
"ld.so.1" error using a cron job | works fine otherwise

Hi,
A cron job CJ invokes a shell script SC. SC internally invokes multiple perl scripts. One of the perl scripts deals with Accurev (i am using Accurev CLI).
The first accurev command encountered is
accurev merge -i <<file_name>> (file name has absolute path)

When I run the perl script or the shell script SC, i get the desired accurev output (sucess).
But when i schedule this through cron CJ, i get this error:
"ld.so.1: accurev: fatal: libintl.so.8: open failed: No such file or directory"

Please help me.... ive never got issues with cron or accurev earlier..this is driving me crazy.. Smilie
OS is solaris 9

Thanks,
DJ
# 2  
Old 08-25-2009
The typical problem with a script that runs normally from the command line but fails at some level as a cron job is environmental differences. If you run a simple cron job with the command:
Code:
env > /tmp/cron_environment

Then run:
Code:
env > /tmp/interactive_env

And compare the results. You'll notice that the cron environment is much more limited. If you simply add all the missing parts from your interactive environment to the script, it will probably work. You can then slowly remove those environmental elements that are unneeded until you get down to what you really need.

See Chapter 12 of Expert Shell Scripting.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Bash script - Print an ascii file using specific font "Latin Modern Mono 12" "regular" "9"

Hello. System : opensuse leap 42.3 I have a bash script that build a text file. I would like the last command doing : print_cmd -o page-left=43 -o page-right=22 -o page-top=28 -o page-bottom=43 -o font=LatinModernMono12:regular:9 some_file.txt where : print_cmd ::= some printing... (1 Reply)
Discussion started by: jcdole
1 Replies

2. Homework & Coursework Questions

How to lclear "expr: syntax error" eventhough everything looks fine?

Hi All, As per my knowledge in unix, my code looks fine. But still I am getting error (expr:syntax error). Please help me to resolve this error. Script : PRE_LBNO=0 PRE_DATE=0 TOT_PAY=0 TOT_REM=0 TOTAL=1 for Record_Type in `cut -c 1 Inputt.dat` do if ; then CURR_LBNO=` cut -c... (6 Replies)
Discussion started by: lathanandhini
6 Replies

3. Red Hat

files having Script which works behind "who" & "w" commands

Dear All, plz print the path of files which have the script of "who" & "w" commands. thnx in advance. (6 Replies)
Discussion started by: saqlain.bashir
6 Replies

4. UNIX for Dummies Questions & Answers

Unix "look" Command "File too large" Error Message

I am trying to find lines in a text file larger than 3 Gb that start with a given string. My command looks like this: $ look "string" "/home/patrick/filename.txt" However, this gives me the following message: "look: /home/patrick/filename.txt: File too large" So, I have two... (14 Replies)
Discussion started by: shishong
14 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. UNIX for Dummies Questions & Answers

CRON JOB SCHEDULER throwing "option not allowed error"

Hi All, Pardon me if this turns out to be a dumb question. But I am trying to schedule a cron job for a my script which takes input options. So an entry in crontab would be something like: 1 * * * * run_report.sh -o out.csv -m monthly -e somename@email.com > cron_output.log 2> cron_error.log... (3 Replies)
Discussion started by: trueharsh
3 Replies

7. Shell Programming and Scripting

sftp can't fine batchfile "No such file or directory"

Hi, I've got a C program that is using execlp to run a non-interactive sftp (using a batchfile) session to send some files to another system. Just before doing that, I create the batchfile called sftp_batch on the fly: V8_26_1:sun-->cat /workspace/sftp_batch cd /tmp/newsftp put test.file... (2 Replies)
Discussion started by: Fiaran
2 Replies

8. HP-UX

ERROR: more than one instance of overloaded function "vprintf" has "C" linkage

Hi people! I've got this own library: -------------------------------------------- Personal.h -------------------------------------------- #ifdef __cplusplus extern "C" { #endif #include <stdio.h> #include <stdarg.h> #include <string.h> ... (0 Replies)
Discussion started by: donatoll
0 Replies

9. Shell Programming and Scripting

Cron job fails, but works fine from command line

I have a very basic script that essentially sends a log file, via FTP, to a backup server. My cron entry to run this every night is: 55 23 * * * /usr/bin/archive_logs The script runs perfectly when executed manually, and actually worked via cron for about three weeks. However, it mysteriously... (3 Replies)
Discussion started by: cdunavent
3 Replies

10. UNIX for Dummies Questions & Answers

Unix "at" / "Cron" Command New Problem...Need help

Hi All, I am trying to schedule a one time job using the at command with the help of shell script for my project. The shell script should take a parameter as a command line argument from the at command itself. Is it possible to take a command line parameter for a shell script in the command... (3 Replies)
Discussion started by: Mohanraj
3 Replies
Login or Register to Ask a Question