Troubleshooting Linux compile Make file error "/bin/bash^m: Bad interpreter: No file or directory" problem

Source: Internet
Author: User

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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.