/bin/bash 文件错误

发布于 2024-10-08 20:34:04 字数 1032 浏览 3 评论 0原文

我正在尝试安装 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

杯别 2024-10-15 20:34:04

由于到目前为止您在该过程中投入的只是一个配置步骤,因此我建议删除当前代码并重试。令人沮丧的是,一次失败的事情很可能会再次失败,但这只是第一步。

您是否通过配置指定了前缀? ./configure --prefix=/usr/gnu 或者类似的东西?

下一个问题是 - 鉴于您正在编译的内容,您的 make 来自哪里?

错误信息较长;当跨行重新格式化时,它是:

 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]”中的多个字母,并且消息中有一处显示“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:

 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""

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:

$(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"

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'.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文