【问题标题】:make: pthread: Command not found制作:pthread:找不到命令
【发布时间】:2015-02-18 10:52:46
【问题描述】:

当我在 ubuntu 中使用“make”来 crunch-3.6 时,出现如下错误:

ubuntu@halflike:~/crunch-3.6$ sudo make
Building binary...
pthread -Wall -pedantic -std=c99   crunch.c -lm  -o crunch
make: pthread: Command not found
make: [crunch] Error 127 (ignored)

如何解决这个问题?

【问题讨论】:

  • makefile pthread 有问题,几乎可以肯定是 -lpthread 并且是编译器的参数。可能有一个编译器变量未正确设置 $(GCC) 或其他东西。此外,您不想大部分时间都希望以 root 身份运行 make
  • 我已经通过“sudo apt-get install build-essential”解决了这个问题。见stackoverflow.com/questions/11934997/…

标签: ubuntu makefile


【解决方案1】:

我遇到这个错误是因为我的电脑上没有安装 gcc,apt-get install gcc 解决了这个问题。

【讨论】:

    【解决方案2】:

    您只需要安装 GCC 即可克服此错误...

    输入... apt-get install gcc

    如果您在安装 GCC 过程中遇到任何错误...键入以下命令...

    输入... apt-get update

    【讨论】:

    • 欢迎来到 Stack Overflow。您的答案与其他答案和 cmets 相同。请不要添加没有提供任何新内容的答案。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-09-28
    • 2016-03-05
    相关资源
    最近更新 更多