“No such file or directory” but it exists

前端 未结 13 1968
南笙
南笙 2020-11-29 21:24

I simply want to run an executable from the command line, ./arm-mingw32ce-g++, but then I get the error message,

bash: ./arm-mingw32ce-g++: No s         


        
13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 21:57

    I faced this error when I was trying to build Selenium source on Ubuntu. The simple shell script with correct shebang was not able to run even after I had all pre-requisites covered.

    file file-name # helped me in understanding that CRLF ending were present in the file.
    

    I opened the file in Vim and I could see that just because I once edited this file on a Windows machine, it was in DOS format. I converted the file to Unix format with below command:

    dos2unix filename # actually helped me and things were fine.
    

    I hope that we should take care whenever we edit files across platforms we should take care for the file formats as well.

提交回复
热议问题