【问题标题】:configure: make: echo: Command not found配置:make:echo:找不到命令
【发布时间】:2018-06-11 13:33:23
【问题描述】:

当我尝试从源代码安装 Ruby 时,无论版本是什么,我都会收到以下错误。

$ ./configure



....
....
checking whether gcc needs -traditional... no
checking for ld... ld
checking whether the linker is GNU ld... yes
checking whether gcc -E accepts -o... yes
checking for ranlib... ranlib
checking for ar... ar
checking for as... as
checking for objdump... objdump
checking for objcopy... objcopy
checking for nm... nm
checking whether ln -s works... yes
checking whether make sets $(MAKE)... no
....
....
....
checking if make is GNU make... make: echo: Command not found
make: *** [all] Error 127
no
checking for safe null command for make... :
checking for nroff... /usr/bin/nroff`

我尝试通过安装 gccg++ 来修复错误,但这没有帮助。

完整的详细日志在这里:https://gist.github.com/satnami/8ac0688c287a8d5c859c5ba064d9bfca

额外细节

Linux 版本

Linux version 4.4.0-104-generic(buildd@lgw01-amd64-030 (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) )

gcc 版本

gcc version 4.8.5 (Ubuntu 4.8.5-2ubuntu1~14.04.1)

OpenssL 版本

OpenSSL 1.0.2g-fips 1 Mar 2016

【问题讨论】:

    标签: ruby linux gcc gnu-make


    【解决方案1】:

    最好在此处至少包含相关信息,例如您使用的操作系统和操作系统版本。从 gist 输出看来,您使用的是某个版本的 GNU/Linux。如果我们知道哪个发行版(例如 Ubuntu)我们会更有帮助。

    也许您没有可用的echo...您的PATH 设置为什么?在许多系统上,echo 存在于/bin/echo,因此请确保您的PATH 上有/bin

    请注意,在你的 shell 中运行echo foo 不够好,因为你的 shell 可能是 bash,它有一个内置的 echo。但是,make 将运行 /bin/sh 而不是 bash,/bin/sh 可能类似于没有内置回显的 dash(取决于您使用的 Linux 发行版)。

    【讨论】:

    • 谢谢,我刚刚更新了问题,包含 /bin 并且 echo 在 /bin/sh 中运行良好
    • 这似乎更像是要求澄清(因此应该是评论)而不是答案。至少,这个答案现在出现在 LQP 审核队列中,所以我可能不是唯一这么想的人。
    【解决方案2】:

    问题是因为缺少文件

    /bin/echo

    相关 Makefile `echo -n' not working

    【讨论】:

      猜你喜欢
      • 2020-09-10
      • 2016-10-18
      • 2019-10-27
      • 2019-09-23
      • 2013-09-12
      • 2019-02-20
      • 2017-06-09
      • 2017-12-25
      • 1970-01-01
      相关资源
      最近更新 更多