在安装rpmbuild生成的包时,发生如下错误:
/var/tmp/rpm-tmp.YiDXeN: line 374: syntax error: unexpected end of file
解决方法:
编写一个shell脚本:
#!/bin/bash
while [ 1 -eq 1 ]
do
cat -n /var/tmp/rpm-tmp.*
done
然后执行 ./sh_test.sh
另一个窗口开始安装,在前面窗口就能看到错误是在哪一行停止的。
如果提示/var/tmp/rpm-tmp.6LJgwM: line 374: syntax error: unexpected end of file
一般是因为if和fi没有配对,可以通过notepad++统计看看,注意 别将elif统计进去了
或者用notepad打开spec脚本,高亮if,看看配对情况。
have not closed a control structure such as a missing fi with an if, or a missing done with a for.
本文介绍了解决rpmbuild生成的包在安装过程中出现的语法错误问题的方法。通过编写并运行一个简单的shell脚本来定位错误的具体位置,并提供了解决if-fi结构未正确配对的建议。
677

被折叠的 条评论
为什么被折叠?



