我正在尝试安装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文件时,我看到的只是乱码,所以我无法修复发生的语法错误。有关如何解决这个问题的任何想法?
感谢。
答案 0 :(得分:1)
由于您到目前为止所有投入的流程都是配置步骤,因此我建议您删除当前代码并重试。失败的机会令人沮丧,一次失败会再次失败,但这是第一步。
您是否使用configure指定了前缀? ./configure --prefix=/usr/gnu
或类似的东西?
接下来的问题是 - 鉴于你正在编译的内容,你的作品来自哪里?
错误消息很长;当跨行重新格式化时,它是:
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""
很明显,那里有许多奇怪的东西。抱怨的是'for'和'in'之间缺少变量名。
您可以在Makefile中找到规则:
$(RECURSIVE_TARGETS):
@fail= failcom='exit 1'; \
for f in x $$MAKEFLAGS; do \
case $$f in \
*=* | --[!k]*);; \
*k*) failcom='fail=yes';; \
esac; \
done; \
dot_seen=no; \
target=`echo $@ | sed s/-recursive//`; \
list='$(SUBDIRS)'; for subdir in $$list; do \
echo "Making $$target in $$subdir"; \
if test "$$subdir" = "."; then \
dot_seen=yes; \
local_target="$$target-am"; \
else \
local_target="$$target"; \
fi; \
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|| eval $$failcom; \
done; \
if test "$$dot_seen" = "no"; then \
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
fi; test -z "$$fail"
所以,你需要找出为什么你没有看到该规则的扩展。错误消息中的准随机位置有“[efm]”缺少的各种字母,以及消息显示为“loocal”而不是“local”的地方。