bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory – 业余语言练习

bash: ./configure: /bin/sh^M: bad interpreter: No such file or directory

解决方式:

把configure文件中的“^M”去掉就可以了。

方法1:

安装:dos2unix

sudo add-apt-repository universe
apt-get install dos2unix

dos2unix configure

把configure文件转化成linux编码格式。

方法2:
在没有dos2unix情况下

cat ./configure.sh | tr -d ‘/r’ > temp.sh
mv temp.sh configure.sh

cat ./configure.sh | tr -d ‘/r’ > temp.sh
mv temp.sh configure.sh

Published
Categorized as web-php

Leave a comment

Your email address will not be published. Required fields are marked *