collect2:致命错误:ld以信号11终止[分段故障] [英] collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
问题描述
我实际上无法在C中编译一个简单的"helloworld".当我键入"gcc hello.c"时,输出为: collect2:致命错误:ld以信号11 [分段故障]终止
I actually can not compile a simple "helloworld" in C. When I type "gcc hello.c" the output is: collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
有一个主意吗?
我尝试重新安装gcc,g ++,make,cmake,binutils.这些都不起作用. 当我在终端中仅输入"ld"时,输出为: 分段错误"
I tried to reinstall gcc,g++,make,cmake,binutils. None of this things worked. When I type just "ld" in the terminal the output is: "Segmentation Fault"
推荐答案
我可以用
sudo apt清除binutils sudo apt删除make sudo apt自动删除 sudo apt install build-essential
sudo apt purge binutils sudo apt remove make sudo apt autoremove sudo apt install build-essential
我不知道为什么它可以与build-essential一起使用...
I don't know why it works with build-essential...
这篇关于collect2:致命错误:ld以信号11终止[分段故障]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!