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 -
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.
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'
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)
This suggests you don't have any permissions issues, but either the group or owner info is missing (ie, there aren't enough fields in that ls output). Is infodba the file owner or the group the file belongs to?
Do you get both the owner and group displayed if you do:
ls -ld /export/home/data
Or
ls -ld /export/home/data/SoftwareSource/TcEng2005SR1
Or
ls -ld /export/home/data/SoftwareSource/TcEng2005SR1/install
There's the problem then. You need the x86 version. SPARC binaries are radically different and won't run on an x86 chip.
In a pinch, you could probably delete the /export/home/data/SoftwareSource/TcEng2005SR1/install/jre tree and replace just that with a SPARC JRE but you'd be likely to hit more problems if any other files in the install are compiled binaries.