目录
报错1:.in’ig.status: error: cannot find input file: `
在Ubuntu系统中执行./configure
时报错:
....
checking that generated files are newer than configure... done
configure: creating ./config.status
.in'ig.status: error: cannot find input file: `
原因分析
这一般是由于从Windows系统拷贝文件到Ubuntu系统中后,系统中某些符号的编码不兼容造成的。
为了解决这个问题,可以使用dos2unix命令将Windows格式的文本文件转换为Unix/Linux格式,使其在Unix/Linux系统中能够正常显示和解释。在Ubuntu中,可以使用以下命令安装dos2unix工具:
sudo apt-get install dos2unix
然后,使用dos2unix
命令对文件进行转换:
dos2unix filename
解决方法
在Ubuntu18.06中,先执行autoconf
再执行./configure
,成功。
在Ubuntu20.04中,依次执行如下步骤:
autoconf
./configure --> 依然报错
dos2unix configure.ac
autoconf
./configure --> 成功
报错2:bad interpreter: /bin/sh^M: no such file or directory
./configure: bad interpreter: /bin/sh^M: no such file or directory
原因分析
这通常是因为文本文件中包含了Windows格式的行结束符(\r\n)
解决方法
sed -i 's/\r//' configure
该命令将从 configure 文件中删除所有的 \r 字符。