Cannot run UNIX executable !


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Cannot run UNIX executable !
# 1  
Old 07-30-2008
Data Cannot run UNIX executable !

I have installed the Darwin Calendar Server on my Mac and got it working.

To start the server I open a Finder window on my mac and click the UNIX executable called RUN.

In order to start the server automatically on bootup I used LINGON to add a startup Daemon to call "RUN -d". When I reboot the server does not start.

The daemon does exist in /Library/LaunchDaemons and the startup string is correctly described, i.e. right path and command. Looking at the logs I find that MAC OS has tried to start the daemon but come up with "command not found".

If I open a Terminal window, navigate to the correct directory and then type "run" I get exactly the same error... "command not found" although an ls shows it IS there. I have tried logging on as ROOT, (sudo tcsh), but still have the same problem so it is not an authority issue it seems.

Can somebody please help.... a) Why can I not run my UNIX executable from Terminal. (There is another UNIX executable that does seem to run). b) if I can get it to run then my startup daemon should run too !?

Many thanks in advance....

ALEX
# 2  
Old 07-30-2008
Hi Alex,

Since you have the run command in ur path. The problem might be in assigning the path variable. There are 2 ways.

1. Run the command by giving the full path like

/../.../run -d

2. You have to set path variable in PATH of your profile by

PATH=$PATH:/usr/bin:usr/sbin

Run the profile and execute the command
# 3  
Old 07-30-2008
Thanks for your suggestions...

I did check the path variable and it looks like this:

PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin

...which I think has everything I need !?

I also try running the command using the full path "/mydir/another/run -d" and I get the error "No such file or directory". In fact this is exactly how the daemon specifies the command i.e. with the full path string. It is this daemon that is failing to start.

Any other suggestions ? I tried a simple "Hello World" BASH script and it comes up with "command not found" when called from the directory in which it lives. I have made it executable and Mac OS X recognizes as a UNIX executable !?

Thanks...
# 4  
Old 07-30-2008
Does command "run" is a unix executable file ,

Try this ....export PATH
and execute the . profile by . ./.profile

and then try to execute the command.

Can u just ls -ltr of the directory in which run command sits and output here so that we can see it....
# 5  
Old 07-30-2008
Thanks for your suggestions...

I could not find .profile on my Mac. There is /etc/profile which looks like this:

# System-wide .profile for sh(1)

if [ -x /usr/libexec/path_helper ]; then
eval `/usr/libexec/path_helper -s`
fi

if [ "${BASH-no}" != "no" ]; then
[ -r /etc/bashrc ] && . /etc/bashrc
fi


If you can tell me where to find it or what the equivalent is on the Mac that would be useful. The path looks to be OK so the shell seems to be inheriting the correct settings but from where I don't know !?

The direcrtory listing "ls -ltr" looks like this:

MacTwo:calendarserver alex$ ls -ltr
total 312
drwxr-xr-x 4 alex admin 136 9 Mar 14:09 twisted
drwxr-xr-x 6 alex admin 204 9 Mar 14:09 lib-patches
-rwxr-xr-x 1 alex admin 2021 9 Mar 14:10 testcaldav
-rwxr-xr-x 1 alex admin 1744 9 Mar 14:10 test
-rwxr-xr-x 1 alex admin 5782 9 Mar 14:10 setup.py
-rwxrwxr-x 1 alex admin 16821 9 Mar 14:10 run1
-rwxr-xr-x 1 alex admin 16821 9 Mar 14:10 run backup copy
-rw-r--r-- 1 alex admin 6593 9 Mar 14:10 README
-rw-r--r-- 1 alex admin 11358 9 Mar 14:10 LICENSE
-rw-r--r-- 1 alex admin 13306 9 Mar 14:10 HACKING
drwxr-xr-x 10 alex admin 340 9 Mar 14:11 doc
drwxr-xr-x 9 alex admin 306 9 Mar 14:12 bin
drwxr-xr-x 9 alex admin 306 9 Mar 14:17 contrib
drwxr-xr-x 14 alex admin 476 24 Mar 20:40 conf
drwxr-xr-x 13 alex admin 442 30 Mar 15:41 support
drwxr-xr-x 65 alex admin 2210 30 Mar 21:38 twistedcaldav
-rwxr-xr-x@ 1 alex alex 16682 27 Jul 14:41 runDarwin
-rwxr-xr-x@ 1 alex admin 16682 27 Jul 14:41 run
drwxr-x--- 4 alex admin 136 30 Jul 13:19 data
drwxr-xr-x 6 alex admin 204 30 Jul 13:19 logs
-rwxr-xr-x@ 1 alex alex 16685 30 Jul 13:27 run2
-rwxr-xr-x@ 1 alex alex 29 30 Jul 13:31 hello
MacTwo:calendarserver alex$


Incidentally, does anyone know what the significance is of the "@" in the output of "ls" ?

Thanks...

ALEX
# 6  
Old 08-03-2008
did u make sure all the files are executable? run chmod +x on them, altho i don't know if this will work but should - i use don't use a MAC tho. Smilie
# 7  
Old 08-03-2008
Thanks for your reply....

Yes I did check to make sure the executable bit was correctly set. The program is called "run" and as far as I am aware I did chmod it correctly as the listing above shows !?

I really need to crack this one so any other ideas would be gratefully received !

ALEX
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Run executable in one directory and then move to another successively

Hello, I have several hundred subdirectories which contain input files for a binary executable. I need to get into each of the subdirectories, run the executable and then move to the next one and repeat the process. What is the best way to do this? Arbitrarily my file structures look like... (3 Replies)
Discussion started by: Gussifinknottle
3 Replies

2. UNIX for Advanced & Expert Users

Figure out the minimum os version neede to run executable or link library.

Hello, I need to figure out the minimum OS version needed to run some executable. For the following OS: Linux, AIX, Solaris. For example how do I know the minimum OS version for /bin/ls ? "file" command does not give me much information. There are some tools that are helpful for understanding... (4 Replies)
Discussion started by: +Yan
4 Replies

3. Shell Programming and Scripting

[SHELL] Executable? Run it!

I would like to make a script that I can see if the file is executable. If it is executable then it needs to run. Otherwise, if it is not executable the file needs to be edited, and run agian. I hope you understand what i mean. :) Thanks for the netherlands (4 Replies)
Discussion started by: dennisbest85
4 Replies

4. UNIX for Dummies Questions & Answers

Can't run the archiver executable error message

I am using the xarchiver on a xfce environment. When compressing a directory using xarchiver which has both files and subdirectories, I encounter the following error: Can't run the archiver executable: Failed to execute child process "tar" (Argument list too long) Does anyone know exactly what... (0 Replies)
Discussion started by: figaro
0 Replies

5. OS X (Apple)

Plist to Unix Executable

I'm using an old conversion method for converting a plist into an XML file, but that's not what I'm needing just via terminal now. What I'm looking for is an answer to convert a plist file into an executable. I'd like to import it into Casper and have the JSS push it out onto an image. In this... (6 Replies)
Discussion started by: unimachead
6 Replies

6. Shell Programming and Scripting

Question on tweaking the PATH variable to allow the world to run my executable script

All, I am pretty new to Unix and still in the learning curve :) I have a simple requirement for which I did not get an answer yet (Atleast I do not know how to keyword the search for my requirement!!!). I have an executable script my.script1 in a folder /data/misc/scripts/dev, which when... (5 Replies)
Discussion started by: bharath.gct
5 Replies

7. Shell Programming and Scripting

Automatically select records from several files and then run a C executable file inside the script

Dear list its my first post and i would like to greet everyone What i would like to do is select records 7 and 11 from each files in a folder then run an executable inside the script for the selected parameters. The file format is something like this 7 100 200 7 100 250 7 100 300 ... (1 Reply)
Discussion started by: Gtolis
1 Replies

8. Shell Programming and Scripting

script run when executable is launched

I need to know how to have a BASH script run every time Firefox is launched, what is the simplest way to do this? (1 Reply)
Discussion started by: glev2005
1 Replies

9. Shell Programming and Scripting

Exit shell after setting executable to run?

Hi, I have an executable file that has a rather long and tedious process to complete. How would I launch the executable using the shell, and then exit the shell while leaving the executable to run in the background? (1 Reply)
Discussion started by: pcwiz
1 Replies

10. Shell Programming and Scripting

run and make an executable file

as i said before i'm a beginner in shell programming and i have two questions: how to run an executable file in shell scripts like for example let's say the file called "prog.exe", what's the shell command to run this file? also how can i make the shell file an executable file (if it is... (5 Replies)
Discussion started by: _-_shadow_-_
5 Replies
Login or Register to Ask a Question