红宝石 – 检查C编译器是否工作…否

红宝石 – 检查C编译器是否工作…否,第1张

概述我最近卸载了 Xcode 4.2并重新安装了 Xcode 4.3.1.安装的命令行工具也.错误说’C编译器不工作’.在搜索这个错误时,它表示当Xcode未安装时会发生.我失踪了什么 rvm install 1.9.3 --with-gcc=clangInstalling Ruby from source to: /Users/ava/.rvm/rubies/ruby-1.9.3-preview1 我最近卸载了 Xcode 4.2并重新安装了 Xcode 4.3.1.安装的命令行工具也.错误说’C编译器不工作’.在搜索这个错误时,它表示当Xcode未安装时会发生.我失踪了什么

rvm install 1.9.3 --with-gcc=clangInstalling Ruby from source to: /Users/ava/.rvm/rubIEs/ruby-1.9.3-prevIEw1,this may take a while depending on your cpu(s)...ruby-1.9.3-prevIEw1 - #fetching ruby-1.9.3-prevIEw1 - #extracting ruby-1.9.3-prevIEw1 to /Users/ava/.rvm/src/ruby-1.9.3-prevIEw1ruby-1.9.3-prevIEw1 - #extracted to /Users/ava/.rvm/src/ruby-1.9.3-prevIEw1Fetching yaml-0.1.4.tar.gz to /Users/ava/.rvm/archivesExtracting yaml-0.1.4.tar.gz to /Users/ava/.rvm/srcConfiguring yaml in /Users/ava/.rvm/src/yaml-0.1.4.ERROR: Error running ' ./configure --prefix="/Users/ava/.rvm/usr"  --with-gcc=clang           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0 ',please read /Users/ava/.rvm/log/ruby-1.9.3-prevIEw1/yaml/configure.logCompiling yaml in /Users/ava/.rvm/src/yaml-0.1.4.ERROR: Error running '/usr/bin/make ',please read /Users/ava/.rvm/log/ruby-1.9.3-prevIEw1/yaml/make.logInstalling yaml to /Users/ava/.rvm/usrERROR: Error running '/usr/bin/make install',please read /Users/ava/.rvm/log/ruby-1.9.3-prevIEw1/yaml/make.install.logruby-1.9.3-prevIEw1 - #configuring ERROR: Error running ' ./configure --prefix=/Users/ava/.rvm/rubIEs/ruby-1.9.3-prevIEw1 --enable-shared --disable-install-doc  --with-gcc=clang           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0 --with-libyaml-dir=/Users/ava/.rvm/usr ',please read /Users/ava/.rvm/log/ruby-1.9.3-prevIEw1/configure.logERROR: There has been an error while running configure. Halting the installation.➜  yaml git:(master) ✗ vi configure.log [2012-03-18 21:03:00]  ./configure --prefix="/Users/ava/.rvm/usr"  --with-gcc=clang           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0           --build=x86_64-apple-darwin11.3.0           --host=x86_64-apple-darwin11.3.0configure: WARNING: unrecognized options: --with-gccchecking for a BSD-compatible install... /usr/bin/install -cchecking whether build environment is sane... yeschecking for a thread-safe mkdir -p... config/install-sh -c -dchecking for gawk... nochecking for mawk... nochecking for nawk... nochecking for awk... awkchecking whether make sets $(MAKE)... yeschecking for x86_64-apple-darwin11.3.0-gcc... nochecking for gcc... gccchecking whether the C compiler works... noconfigure: error: in `/Users/ava/.rvm/src/yaml-0.1.4':configure: error: C compiler cannot create executablesSee `config.log' for more details➜  ~ git:(master) ✗ gcc -v   Using built-in specs.Target: i686-apple-darwin11Configured with: /private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/src/configure --disable-checking --enable-werror --prefix=/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2 --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-prefix=llvm- --program-transform-name=/^[cg][^.-]*$/s/$/-4.2/ --with-slibdir=/usr/lib --build=i686-apple-darwin11 --enable-llvm=/private/var/tmp/llvmgcc42/llvmgcc42-2336.9~22/dst-llvmCore/Developer/usr/local --program-prefix=i686-apple-darwin11- --host=x86_64-apple-darwin11 --target=i686-apple-darwin11 --with-gxx-include-dir=/usr/include/c++/4.2.1Thread model: posixgcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2336.9.00)➜  ~ git:(master) ✗ which gcc/usr/bin/gcc
解决方法 终端:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

另外,在Xcode中,确保安装了命令行工具.选择Xcode>首选项,单击下载,如有必要,单击“命令行工具”旁边的安装按钮.

总结

以上是内存溢出为你收集整理的红宝石检查C编译器是否工作…否全部内容,希望文章能够帮你解决红宝石 – 检查C编译器是否工作…否所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/web/1062518.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-26
下一篇 2022-05-26

发表评论

登录后才能评论

评论列表(0条)

保存