![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk and execute app | tyger52 | Shell Programming and Scripting | 0 | 12-06-2007 06:43 PM |
| execute | bkan77 | Shell Programming and Scripting | 3 | 07-20-2007 10:42 AM |
| script execute or no execute | Kespinoza97 | Shell Programming and Scripting | 4 | 06-23-2007 06:27 AM |
| Need to execute 2 scripts, wait, execute 2 more wait, till end of file | halo98 | Shell Programming and Scripting | 1 | 08-01-2006 01:42 PM |
| awk and execute command ??? | sabercats | Shell Programming and Scripting | 13 | 03-28-2006 03:12 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
cannot execute message
I am trying to install a piece of software using the provided install script, but when I run it, I get the following message: ./tem.sh[15]: /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java: cannot execute
I navigated to that directory and tried to execute java and it returns the same message: $ ./java ksh: ./java: cannot execute The install script is as follows: #!/bin/ksh SCRIPTDIR=`dirname $0` # The dir containing this script. SCRIPTDIR=`cd ${SCRIPTDIR}; pwd` # Convert it to an absolute path - cd ${SCRIPTDIR} JARS=`ls -m install/*.jar|tr -s ',' ':'|tr -d ' \n'` ${SCRIPTDIR}/install/jre/bin/java -cp ${JARS} com.teamcenter.install.tem.struct.Tem $1 $2 $3 Any help is much appreciated, mncduffy |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
trying to understand which command is in error?
Is the problem with the ./tem.sh perhaps? Kind of hard to follow the cut/paste with potential line-wrap issues.
Would a simple $chmod +x tem.sh solve this by making the shell script executable? Then you would $tem.sh to execute the script. Another thought to see where you are erroring is to edit the script (vi editor or other) and insert output comments such as: echo "SCRIPTDIR is now set" throughout the file. This will allow you to track the program progress. |
|
#3
|
|||
|
|||
|
Quote:
The install script 'tem.sh' is excutable and so is the file it is trying to run. The tem.sh script is failing on the line that trys to execute JAVA: ${SCRIPTDIR}/install/jre/bin/java -cp ${JARS} com.teamcenter.install.tem.struct.Tem $1 $2 $3 In a terminal window, I navigated to the directory reference by the tem.sh script, (${SCRIPTDIR}/install/jre/bin), and tried to execute 'java', (which has executable permission), by entering './java' (without the quotes). and it returns 'ksh: ./java: cannot execute' |
|
#4
|
||||
|
||||
|
Run the following two commands (as the same user that will be running the install):
ls -l /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java file /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java This will provide some more info on the nature of that file - it's looking a bit like permissions or something wrong with the java binary (eg it could be a wrapper script) |
|
#5
|
|||
|
|||
|
Results of the ls and file command
I ran the following:
$ ls -l /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java Which returned: -rwxr-xr-x 1 infodba 78880 Jul 11 2006 /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java Then ran the following: $ file /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java Which returned: /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped |
|
#6
|
||||
|
||||
|
Code:
-rwxr-xr-x 1 infodba 78880 Jul 11 2006 /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java Do you get both the owner and group displayed if you do: Code:
ls -ld /export/home/data Code:
ls -ld /export/home/data/SoftwareSource/TcEng2005SR1 Code:
ls -ld /export/home/data/SoftwareSource/TcEng2005SR1/install Code:
/export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, stripped Next question, what happens if you run (as the same user that would run the installer): Code:
/export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java -version Last edited by Smiling Dragon; 01-30-2008 at 03:12 PM. Reason: Fixed a 'code' tag that was making it hard to read |
|
#7
|
|||
|
|||
|
infodba is the owner
When I run: ls -ld /export/home/data I get: drwxrwxrwx 3 root 512 Jan 29 12:45 /export/home/data When I run: ls -ld /export/home/data/SoftwareSource/TcEng2005SR1 I Get: drwxr-xr-x 12 infodba 512 Jan 29 12:45 /export/home/data/SoftwareSource/TcEng2005SR1 When I run: ls -ld /export/home/data/SoftwareSource/TcEng2005SR1/install I get: drwxr-xr-x 7 infodba 1536 Jul 11 2006 /export/home/data/SoftwareSource/TcEng2005SR1/install This is not a SPARC processor, it is an Intel X86 version of Solaris When I run: /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java -version I get: ksh: /export/home/data/SoftwareSource/TcEng2005SR1/install/jre/bin/java: cannot execute Is the problem the processor type? Thanks again for all of the help on this one! |
|||
| Google The UNIX and Linux Forums |