Ubuntu 下执行sh脚本 报错 :-bash: ./build_xx.sh: /bin/sh^M: bad interpreter: No such file or directory
执行sh脚本报这个错,很是郁闷,但是目录下的确有这个文件。
网上搜索找到答案--https://superuser.com/questions/344533/no-such-file-or-directory-error-in-bash-but-the-file-exists
原因:我的机器是64位的,需要32位的支持库。在Ubuntu 13.10及以后版本中依赖了 libncurses5:i386,libstdc+6:i386,and zlib1g:i386的包。
|
Android SDK requires 32-bit libraries. You probably are on 64-bit and need the 32-bit libs. Here are the troubleshooting directions fromdeveloper.android.com For Ubuntu 13.10 (Saucy Salamander) and above,install the sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install libncurses5:i386 libstdc++6:i386 zlib1g:i386 For earlier versions of Ubuntu,241); white-space:pre-wrap">ia32-libspackage using apt-get: apt-get install ia32-libs |
所以执行如下命令进行安装包: