Hi everyone,
I'm trying to run a plotting tool called gnuplot.
So there is a /import/tools/exe directory which has a 'gnuplot' file and a '.gnu_tool_wrapper' file. When I type 'gnuplot' in this directory, it's supposed to go through the wrapper and run /import/tools/local/gnuplot/4.2.2/bin/gnuplot, and a gnuplot prompt will show up.
However, when I do that, it shows this:
/import/freetools/local/gnuplot/4.2.2/bin/gnuplot: cannot execute
I have execute permission for all the files mentioned above, so I'm not sure what's wrong.
Does anyone have any ideas? Thanks in advance!
If gnuplot is a shell script, it needs to start with a #! line as described in man execvp.
Hi DGPickett,
Yes, it's a shell script, and it starts with #! /bin/sh -f.
My login shell is /bin/tcsh though, would that be a problem?
Can you run other executables from that directory? If not, perhaps the filesystem is mounted NOEXEC.
Regards,
Alister
Yeah, I think I can. The thing is, my manager can run it, so I'm thinking maybe it's something about my own environment.
You talk about /import/tools/local/ but the error is about /import/freetools/local/ ?
Sorry about that. They're all freetools.
What give
file /bin/ls /import/freetools/local/gnuplot/4.2.2/bin/gnuplot
df /bin/ls /import/freetools/local/gnuplot/4.2.2/bin/gnuplot
?
You can use strace/truss/tusc to trace the execution and see what stimulates the error. It's very educational!
truss -faelo /tmp/gnuplot.tr -rall -wall -xall tcsh -c /import/freetools/local/gnuplot/4.2.2/bin/gnuplot
Options vary by tool and O/S.
Wow, the two of them are quite different...
input:
file /bin/ls /import/freetools/local/gnuplot/4.2.2/bin/gnuplot
output:
/bin/ls: ELF 32-bit LSB executable 80386 Version 1, dynamically linked, stripped
/import/freetools/local/gnuplot/4.2.2/bin/gnuplot: ELF 32-bit MSB executable SPARC Version 1, dynamically linked, not stripped
So, you got a SPARC binary on an x86 system, try again.