“No such file or directory” but it exists

前端 未结 13 1995
南笙
南笙 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 got this error “No such file or directory” but it exists because my file was created in Windows and I tried to run it on Ubuntu and the file contained invalid 15\r where ever a new line was there. I just created a new file truncating unwanted stuff

    sleep: invalid time interval ‘15\r’
    Try 'sleep --help' for more information.
    script.sh: 5: script.sh: /opt/ag/cont: not found
    script.sh: 6: script.sh: /opt/ag/cont: not found
    root@Ubuntu14:/home/abc12/Desktop# vi script.sh 
    root@Ubuntu14:/home/abc12/Desktop# od -c script.sh 
    0000000   #   !   /   u   s   r   /   b   i   n   /   e   n   v       b
    0000020   a   s   h  \r  \n   w   g   e   t       h   t   t   p   :   /
    
    0000400   :   4   1   2   0   /  \r  \n
    0000410
    root@Ubuntu14:/home/abc12/Desktop# tr -d \\015 < script.sh > script.sh.fixed
    root@Ubuntu14:/home/abc12/Desktop# od -c script.sh.fixed 
    0000000   #   !   /   u   s   r   /   b   i   n   /   e   n   v       b
    0000020   a   s   h  \n   w   g   e   t       h   t   t   p   :   /   /
    
    0000400   /  \n
    0000402
    root@Ubuntu14:/home/abc12/Desktop# sh -x script.sh.fixed 
    

提交回复
热议问题