/bin/bash 文件错误
我正在尝试安装 gnu make。我能够运行 ./configure 脚本,但是当我尝试“make”或“make install”时,出现以下错误:
make[1]: Entering directory `/opt/make-3.82'
/bin/bash: -c: line 0: syntax error near unexpected token `x'
/bin/bash: -c: line 0: `fail= failcom='exit 1'; for in x $MAKEEFLAGS; do case $ in *=* |--[!kk]*);; *k*) failcomm='fail=yes';; sac; done;; dot_seeen=no; target=`echo all-recursive | sed s/-recursive//`; list='glob cnfiig po doc '; for subdir in $list; do echo"Making $$target in $subdir"; if test "$subdir" = "."; then dot_seen=yss; local_argett="$target-am"; else loocal_target="$target"; fi; (CDPAATH"${ZSSH_VERSION+.}:" && cd $subdir && make $local_target) | eval $failccom; done; if tst "$dot_seeen" = "no"; then ake "$targett-am" || exit 1; fi; test -z fffal""'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/make-3.82'
make: *** [all] Error 2
我相信我的 bash 文件已损坏,但问题是,当我打开 /bin/ 时bash 文件中,我看到的都是乱码,所以我无法修复发生的语法错误。关于如何解决这个问题有什么想法吗?
谢谢。
I'm attempting to install gnu make. I was able to run the ./configure script but when I attempt a 'make' or a 'make install', I get the following error:
make[1]: Entering directory `/opt/make-3.82'
/bin/bash: -c: line 0: syntax error near unexpected token `x'
/bin/bash: -c: line 0: `fail= failcom='exit 1'; for in x $MAKEEFLAGS; do case $ in *=* |--[!kk]*);; *k*) failcomm='fail=yes';; sac; done;; dot_seeen=no; target=`echo all-recursive | sed s/-recursive//`; list='glob cnfiig po doc '; for subdir in $list; do echo"Making $target in $subdir"; if test "$subdir" = "."; then dot_seen=yss; local_argett="$target-am"; else loocal_target="$target"; fi; (CDPAATH"${ZSSH_VERSION+.}:" && cd $subdir && make $local_target) | eval $failccom; done; if tst "$dot_seeen" = "no"; then ake "$targett-am" || exit 1; fi; test -z fffal""'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/make-3.82'
make: *** [all] Error 2
I believe my bash file is corrupted but the problem is, when I open the /bin/bash file, all I see is gibberish so I'm unable to fix the syntax error that occured. Any ideas to how to approach this problem?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
由于到目前为止您在该过程中投入的只是一个配置步骤,因此我建议删除当前代码并重试。令人沮丧的是,一次失败的事情很可能会再次失败,但这只是第一步。
您是否通过配置指定了前缀?
./configure --prefix=/usr/gnu
或者类似的东西?下一个问题是 - 鉴于您正在编译的内容,您的 make 来自哪里?
错误信息较长;当跨行重新格式化时,它是:
很明显,其中存在许多奇怪的地方。人们抱怨的一个问题是“for”和“in”之间缺少变量名。
您可以在 Makefile 中找到该规则:
因此,您需要找出为什么没有看到该规则的扩展。错误消息中的准随机位置缺少“[efm]”中的多个字母,并且消息中有一处显示“local”而不是“local”。
Since all you've invested in the process so far is a configure step, I recommend removing the current code and trying again. The chances are depressingly good that what failed once will manage to fail again, but it is the first step.
Did you specify a prefix with configure?
./configure --prefix=/usr/gnu
or something like that?The next question is - where is your make coming from, given that is what you are compiling?
The error message is long; when reformatted across lines, it is:
And it is clear that there are a number oddities in there. The one that is complained about is the absence of a variable name between 'for' and 'in'.
You can find the rule in Makefile:
So, you need to find out why you are not seeing an expansion of that rule. There are various letters from '[efm]' missing at quasi-random places in the error message, and one place where the message says 'loocal' instead of 'local'.