Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Not Found Error

Status
Not open for further replies.

mark1110

Programmer
Apr 20, 2005
85
0
0
US
Hi,

Our group is moving from an old version of HP Unix on an old server to AIX on a new server. There are perl scripts that need to be tested. I copied them from the old server to the new server. However, when I tried to test out the perl scripts, I am getting a file not found error. The script is in the /user/bin directory. When I run the perl script I am in the /user/bin directory. When I type echo $PATH I see the /user/bin directory in the path. Is there something I am missing? I even tried entering /user/bin/myPerl.pl but I get the same error message.

Thanks,

Mark
 
Look at the first line of the scripts...

See something like

[tt]#!/usr/bin/perl[/tt]

? It is probably another directory where perl is found on your old HP box.

Now, on the AIX box use this command:

[tt]type perl[/tt]

to find out where the perl command is located.

Then, modify every perl script to make sure the scripts can find the perl command when you invoke them.

HTH,

p5wizard
 
You were right, the first line of the perl script was different than the directory perl was in. I changed it to #!/usr/bin/perl -P and I got rid of the file not found. However I am now getting another error message stating:

/usr/opt/perl5/bin/cppstdin: cc_r: not found

Do I need to path to this directory?
 
here is the contents of the cppstdin file.


cat >.$$.c; rm -f .$$.u; cc_r ${1+"$@"} -M -c .$$.c 2>/dev/null; test -s .$$.u && awk '$2 ~ /\.h$/ { print "# 0 \""$2"\"" }' .$$.u; rm -f .$$.o .$$.u; cc_r -E ${1+"$@"} .$$.c; rm .$$.c


I don't know c++ but could this be a make file (c++ standard input)? Is the cc_r the error message is mentioning a compiler?
 
If you don't have a c compiler, then this version of cppstdin won't work.

You might want to modify cppstdin to use "cpp" instead of "cc_r"; The command cpp (/usr/bin/cpp) should be available on every AIX box, even without cc installed).

HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top