本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>
发布时间: 2020-09-27 | 浏览次数: 2697 | 下载次数: 0 | 作者: jWX931350 | 文档编号: EKB1100056618
用rpmbuild打包rpmbuild -bp nginx.spec时提示:
/var/tmp/rpm-tmp.UnlH9g: line 37: $'\r': command not found
error: Bad exit status from /var/tmp/rpm-tmp.UnlH9g (%prep)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.UnlH9g (%prep)
1、查看rpmbuild -bp nginx.spec 配置正常,运行依然报错。
2、用file查询格式:
nginx.spec: ASCII text, with CRLF line terminators
3、dos2unix nginx.spec 对该文件进行格式化。
4、再用file查看格式:
nginx.spec: ASCII text
5、再次rpmbuild -bp nginx.spec 正常。
因为nginx.spec文件在windows下编辑
所以文件格式不是ASCII text
格式化之后正常,才可进行操作。
在windows下编写的脚本或者配置文件时,
需要注意文件格式及符号格式
若格式不对,需进行相应格式化才能继续操作。