-bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory When executing the executable script under the Linux terminal, the above error is reported

Analysis of the above error report: This is caused by different system encoding formats: the .sh file edited in the Windows system may have invisible characters, so the above exception message will be reported when executed under the Linux system.

Here is the error that the author encountered when executing the ./configure configuration file after pulling the source code file on the Windows system and transferring it to the Linux machine used through xftp.

To sum up, the problems caused by different system encoding formats

Attached is the author's own solution:

vi <filename>

Please replace <filename> in the above command with the file name that caused the above error when executing the corresponding file.

Then press ESC to enter the command format

Enter the following command to view the file encoding format

:set ff

or

:set fileformat

The two have the same meaning, the difference is nothing more than abbreviation or not.

View the results as follows

fileformat=doc

Then enter:

:set ff=unix

Then enter wq to save and press Enter to exit.

Guess you like

Origin blog.csdn.net/weixin_44110324/article/details/131771635