简体   繁体   English

配置错误:C 编译器无法创建可执行文件

[英]configure error: C compiler cannot create executables

I was trying to install rvm ( \\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles).我试图安装 rvm(\\curl -L https://get.rvm.io | bash -s stable --ruby --autolibs=enable --auto-dotfiles)。 It worked fine until ZI got a configure error:它工作正常,直到 ZI 出现配置错误:

Error running './configure --prefix=/home/nishant/.rvm/rubies/ruby-2.0.0-p247 --disable-install-doc --enable-shared',
please read /home/nishant/.rvm/log/1379591052_ruby-2.0.0-p247/configure.log
There has been an error while running configure. Halting the installation.

Following are the contents of the mentioned log file:以下是上述日志文件的内容:

[2013-09-19 17:15:58] ./configure
current path: /home/nishant/.rvm/src/ruby-2.0.0-p247
command(4): ./configure --prefix=/home/nishant/.rvm/rubies/ruby-2.0.0-p247 --disable-install-doc --enable-shared
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for gcc... gcc
checking whether the C compiler works... no
configure: error: in `/home/nishant/.rvm/src/ruby-2.0.0-p247':
configure: error: C compiler cannot create executables
See `config.log' for more details

I then tried a "hello world" C program and got the following error on compilation:然后我尝试了一个“hello world”C程序并在编译时出现以下错误:

nishant@nishant-Inspiron-1545:~$ gcc -g -o hello hello.c 
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status

I'm not sure why this error is thrown.我不确定为什么会抛出这个错误。 I couldn't find a satisfactory answer to this on the forum.我在论坛上找不到满意的答案。 Could someone please help.有人可以帮忙吗。 Thanks谢谢

我遇到了同样的问题,我解决了购买用于构建C程序的安装证书和库的问题。

apt-get install build-essential

I have build-essential installed.我已经安装了 build-essential。 Still doesn't work还是不行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 kdevelop 3.5:配置:错误:C ++编译器无法创建可执行文件 - kdevelop 3.5: configure: error: C++ compiler cannot create executables 由于`configure: error: C compiler cannot create executables`,Pyenv 无法安装 Python 3 的旧版本 - Pyenv unable to install older versions of Python 3 due to `configure: error: C compiler cannot create executables` 在使用 LLVM 构建 Coreutils 期间,C 编译器无法创建可执行文件 - C compiler cannot create executables during build of Coreutils with LLVM 运行“配置”进行安装时,Alsa驱动程序Ubuntu Compiler错误 - Alsa Driver Ubuntu Compiler error when running 'configure' for installation 英特尔 C++ 编译器在 Ubuntu 更新后找不到标头 - Intel C++ compiler cannot find headers after Ubuntu updates 在C ++上(在Ubuntu上)我必须为编译器配置什么才能找到导入项?(例如iostream,stdio,math等) - on c++(on ubuntu) what i must configure for the compiler find the imports?(like iostream,stdio,math,etc) 编译器错误:/ usr / bin / ld:找不到-lbluetooth - Compiler Error: /usr/bin/ld: cannot find -lbluetooth 标准标头中的C编译器错误-未定义的C ++定义 - C Compiler error from standard headers - undefined C++ definitions 无法在intelliji中配置docker - Cannot configure docker in intelliji 在Fix8 C ++库中运行Linux配置错误? - Running Linux configure error in Fix8 C++ library?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM