/usr/bin/env: perl^M: No such file or directory

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
ckerry
Posts: 22
Joined: Wed Sep 15, 2010 1:59 pm
Location: UNSW Australia

/usr/bin/env: perl^M: No such file or directory

#1 Unread post by ckerry »

Hello,
When I compile I get the following error.

Clean previous scratch build
svn: E155007: '/scale_wlg_persistent/filesets/project/mocean03108/roms_src/trunk' is not a working copy
svn: E155007: '/scale_wlg_persistent/filesets/project/mocean03108/roms_src/trunk' is not a working copy
rm -f -r core *.ipo /home/ckerry/OSSEs/Truth/compiling_new/build /home/ckerry/make_macros.mk
/usr/bin/env: perl^M: No such file or directory
svn: E155007: '/scale_wlg_persistent/filesets/project/mocean03108/roms_src/trunk' is not a working copy
svn: E155007: '/scale_wlg_persistent/filesets/project/mocean03108/roms_src/trunk' is not a working copy
cp -f /opt/nesi/mahuika/netCDF-Fortran/4.4.4-intel-2017a/include/netcdf.mod /home/ckerry/OSSEs/Truth/compiling_new/build
cp -f /opt/nesi/mahuika/netCDF-Fortran/4.4.4-intel-2017a/include/typesizes.mod /home/ckerry/OSSEs/Truth/compiling_new/build
/bin/sh: ./ROMS/Bin/sfmakedepend: /usr/bin/: bad interpreter: Permission denied
make: *** No rule to make target `/home/ckerry/OSSEs/Truth/compiling_new/build/MakeDepend', needed by `all'. Stop.

The first line of the file ./roms_src/trunk/ROMS/Bin/sfmakedepend was #!/usr/bin/env perl, however on my server perl is in #!/usr/bin/, so I changed this line to #!/usr/bin/ perl

However I still get the error: /usr/bin/env: perl^M: No such file or directory
Why is it looking in /usr/bin/env? This directory doesn't exist. And what does the ^M mean?

Thanks for your help

robertson
Site Admin
Posts: 227
Joined: Wed Feb 26, 2003 3:12 pm
Location: IMCS, Rutgers University

Re: /usr/bin/env: perl^M: No such file or directory

#2 Unread post by robertson »

This would indicate that you checked out the ROMS source code on a Windows machine then tried to build it on a non-Windows system. The '^M' is how Windows (DOS actually) style line endings/carriage returns are interpreted by non-Windows systems.

ckerry
Posts: 22
Joined: Wed Sep 15, 2010 1:59 pm
Location: UNSW Australia

Re: /usr/bin/env: perl^M: No such file or directory

#3 Unread post by ckerry »

Ahh OK thank you.
I did this as the Gui was so much easier, then I copied to the Linux machine. Which I now realise is incorrect.

I have now downloaded the code from the terminal and checked out the required version, and all is compiling well. Thank you.

git clone https://www.myroms.org/git/src ./
git checkout a1acda7144383ce76018b4bf6ff8a8ea69ba6e6f

Post Reply