Ubuntu 找不到make:pthread:命令

Ubuntu 找不到make:pthread:命令,ubuntu,makefile,Ubuntu,Makefile,当我在ubuntu中使用make to 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) 如何解决此问题?我出现此错误是因为我的计算机上

当我在ubuntu中使用make to 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)

如何解决此问题?

我出现此错误是因为我的计算机上没有安装gcc,apt get install gcc解决了此问题。

您只需安装gcc即可克服此错误

键入。。。apt-get-install-gcc

如果在安装GCC期间出现任何错误…请键入以下命令


键入。。。apt get update

makefile pthread有点问题,几乎可以肯定它应该是-lpthread,并且是编译器的一个参数。可能有一个编译器变量未正确设置$GCC或其他内容。您也不希望在大多数情况下以root用户身份运行make。我已经通过sudo apt get install build-essential解决了这个问题。请参阅欢迎使用堆栈溢出。您的答案与其他答案和评论相同。请不要添加没有提供任何新内容的答案。