PS Background: I am in the company to do the SDK PC-side development, so often in the win under the compiler to run after running to Linux to run again has been ensured to support multi-platform.
Today, after running a program under win, and then running under Linux, I used the command:
sudo./build.sh
But nothing happens. So I changed the instructions, with
chmod u+x build.sh./build.sh
Error "build.sh/bin/bash^m: Bad interpreter: No file or directory". Previously encountered this problem, changed several methods of compilation to solve, single this time or not, so change:
Bash build.sh
When compiling the error:
Later a think \ r This symbol how to appear, so all kinds of Baidu, just know the reason may be because I in win under Operation, modified to this file.
When the edit under Win, the end of the line is \n\r, and under Linux is \ n, so there will be more out of the \ r
With instructions:
Sed-i ' s/\r$//' build.sh
will replace the \ r in build.sh with blank!
Compile again! Success!!
Troubleshooting Linux compile Make file error "/bin/bash^m: Bad interpreter: No file or directory" problem