OSX: Build using script.sh failed (bad interpreter)
lukashoror opened this issue · 3 comments
Hi, I'm using script.sh from home page to build on OSX 10.13.4 and it fails when it's going to build fuse-ext2:
./script.sh: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory
./script.sh: line 74: ./configure: No such file or directory
make: *** No targets specified and no makefile found. Stop.
make: *** No rule to make target install. Stop.
When I run autogen.sh manually, it also says 'bad interpreter'. When I copy content of autogen.sh from git web (not raw) and save it, it works. Is it problem with incorrect line endings?
have a bin/sh in /bin?
/src/mac/utilis/fuse-ext2-20180729>ls /bin/sh -l
-r-xr-xr-x 1 root wheel 618512 2017/09/21 12:35:23 /bin/sh
Of course I have.
OT: The command should be ls -l /bin/sh.
ha ha, I install GNU coreutils in my MAC
are u see "./script.sh: ./autogen.sh: /bin/sh^M" --------> ^M
it's mean end of line is ^M (CTRL-M), usually windows use it alias name CRLF
but we use MAC unix like, end of line is LF
so u need to sure 2 things,
- change EOL to LF
- use UTF8 encode
u can use ultraedit do this
open this file and save as file, chose EOL and code page format
it's all