Linux下执行脚本提示No such file or directory

来源:互联网 发布:西游之路法相进阶数据 编辑:程序博客网 时间:2024/05/21 02:49

1.现象描述:

linux下编译sifteo sdk后,使用./sifteo-sdk-shell.sh的时候提示如下错误:

: No such file or directory

2.原因分析:

我的源码是在window下git clone下来的,所以考虑文件格式错误,在当前目录下明显有这个脚本,既然它提示不存在,肯定是因为linux环境没有读到该文件,因此考虑文件格式为dos

3.解决方法:

使用dos2unix命令将该脚本转换为unix格式,重新执行该脚本即可,如果没有dos2unix命令,切换到root用户采用apt-get安装即可,相关命令如下:

sudo apt-get install dos2unixdos2unix sifteo-sdk-shell.sh
阅读全文
0 0
原创粉丝点击