配置:错误:安装Ruby 1.9.3时,C编译器不能创建可执行文件 [英] configure: error: C compiler cannot create executables when installing Ruby 1.9.3

查看:2114
本文介绍了配置:错误:安装Ruby 1.9.3时,C编译器不能创建可执行文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到以下错误试图安装Ruby 1.9.3上TRISQUEL 6使用以下命令 RVM安装1.9.3

错误


错误运行'的./configure
- preFIX = /家庭/约书亚/ .rvm /红宝石/红宝石1.9.3-P448 --disable安装-doc的--enable-共享,请阅读/home/joshua/.rvm/log/ 1379507772_ruby-1.9.3-P448 / configure.log有
在运行配置了一个错误。暂停安装。

显示我的configure.log粘贴以下


[2013年9月18日20时36分16秒]运行./configure当前路径:
/home/joshua/.rvm/src/ruby-1.9.3-p448命令(4):的./configure - preFIX = /家庭/约书亚/ .rvm /红宝石/红宝石1.9.3-P448 - -disable安装-doc的--enable-共享
检查建设系统类型... i686的-PC-Linux的GNU检查主机系统类型... i686的-PC-Linux的GNU
检查目标系统类型... i686的-PC-Linux的GNU
检查GCC海湾合作委员会...
检查C编译器是否工作......没有
配置:错误:`/home/joshua/.rvm/src/ruby-1.9.3-p448':配置:错误:C编译器不能创建可执行文件见`的config.log'了解更多详情

的config.log文件

 此文件包含在运行配置,如果配置出错,以帮助调试由编译器产生的任何消息。它是由配置,这是由GNU的Autoconf 2.69生成创建的。调用命令行是  $的./configure  -  preFIX = /家庭/约书亚/ .rvm /红宝石/红宝石1.9.3-P448
--with-GCC =铛--disable安装-doc的--enable-共享## --------- ##
##平台。 ##
## --------- ##主机名= trisquel6的uname -m = i686的使用uname -r = 3.2.0-52-仿制PAE的uname -s =的Linux的uname -v =#0trisquel1 SMP周四8月22日22时04分28秒UTC 2013在/ usr /斌/的uname -p =未知/斌/ -X的uname =未知/斌/ ARCH =未知的/ usr / bin中/拱-k =未知的/ usr /凸/ getsysinfo =未知的/ usr / bin中/ Hostinfo中=未知/斌/机=未知的/ usr / bin中/ oslevel =未知/斌/宇宙=未知PATH:在/ usr / local / bin目录路径:在/ usr / bin路径:/ bin路径:在/ usr /游戏PATH:/media/allihave/jdkversions/jdk1.7.0_40/bin路径:/媒体/ allihave /框架/ apacheAnt / Apache的ANT-1.9.2 / bin路径:/media/allihave/frameworks/play/play-2.1.0 PATH:/media/allihave/frameworks/scala-2.10.0/bin路径:/媒体/ allihave /框架/ Clojure中的/ dev / bin路径中:/ opt / LAMPP / bin路径:/媒体/ allihave / bashincludes路径:/媒体/ allihave / bashincludes / google_appengine PATH:/home/joshua/.rvm/bin
## ----------- ##
##核心测试。 ##
## ----------- ##配置:2799:检查创建系统类型配置:2813:结果是:为i686-Linux PC的GNU的配置:2881:检查主机系统类型配置:2894:结果是:为i686-Linux PC的GNU的配置:2914:检查目标系统类型配置:2927:结果是:为i686-Linux PC的GNU的配置:3408:检查C编译器版本配置:3417:铛
--version>及5条的Ubuntu版本铿锵3.0-6ubuntu3(标签/ RELEASE_30 /决赛)(基于LLVM 3.0)目标:把i386-pc-linux的GNU的线程模型:POSIX配置:3428:$? = 0配置:3417:铛-v
>及5条的Ubuntu版本铿锵3.0-6ubuntu3(标签/ RELEASE_30 /决赛)(基于LLVM 3.0)目标:把i386-pc-linux的GNU的线程模型:POSIX配置:3428:$? = 0配置:3417:铿锵-V>和5铛:错误:参数-V缺少(预期值为1)铛:错误:没有输入文件配置:3428:$? = 1配置:3417:铿锵-qversion>和5铛:错误:没有输入文件配置:3428:$? = 1配置:3448:检查C编译器是否工作配置:3470:铿锵conftest.c>和5配置:3474:$? = 0配置:3522:结果:是配置:3525:检查C编译器默认的输出文件名配置:3527:结果:a.out的配置:3533:检查可执行文件的后缀配置:3540:铿锵-o conftest conftest.c >和5配置:3544:$? = 0配置:3566:结果:配置:3588:检查我们是否交叉编译配置:3596:铿锵-o conftest conftest.c>和5配置:3600:$? = 0配置:3607:./conftest配置:3611:$? = 0配置:3626:结果是:没有configure:3631:检查对象文件后缀配置:3653:铿锵-c conftest.c>和5配置:3657:$? = 0配置:3678:结果:o配置:3682:检查我们是否使用的是GNU C编译器配置:3701:铿锵-c conftest.c>和5配置:3701:$?
= 0配置:3710:结果:是配置:3719:检查铿锵是否接受-g配置:3739:铿锵-c -g conftest.c>和5配置:3739:$? = 0配置:3780:结果:是配置:3797:检查铛选项接受ISO C89配置:3860:铿锵-c -g -O2 conftest.c
>和5配置:3860:$? = 0配置:3873:结果:无需要配置:3951:检查g ++的配置:3967:位于/ usr / bin中/ g ++的配置:3978:结果是:G ++配置:4005:检查C ++编译器版本配置:4014:G ++ - -version>和5 G ++(Ubuntu的/ Linaro的
4.6.3-1ubuntu5)4.6.3版权所有(C)2011自由软件基金会这是自由软件;参见复印条件的来源。有没有保修;甚至不是针对特定目的的适销。配置:4025:$? = 0配置:4014:G ++ -v>和5使用内置规格。 COLLECT_GCC = G ++ COLLECT_LTO_WRAPPER = / usr / lib目录/ GCC / i686的-Linux的GNU / 4.6 / LTO-包装目标:i686的Linux的GNU的配置有:../src/configure -v
--with-pkgversion ='的Ubuntu / Linaro的4.6.3-1ubuntu5'--with-bugurl =文件:///usr/share/doc/gcc-4.6/README.Bugs --enable-语言= C,C ++, FORTRAN,objc,OBJ-C ++ - preFIX =的/ usr --program后缀= -4.6 --enable-共享--enable-连接建造-ID --with-系统的zlib --libexecdir = / usr / lib目录--without-包括-gettext的--enable-线程= POSIX --with-GXX-包括-DIR = / usr / include目录/ C ++ / 4.6 = --libdir / usr / lib目录--enable-NLS - 与-SYSROOT = / --enable-clocale = GNU --enable-libstdcxx调试--enable-libstdcxx时间= YES --enable-GNU的唯一对象--enable-插件--enable-objc-GC - -enable-目标=所有--disable-werror --with拱-32 = i686的--with调整=通用--enable-检查=发行--build = i686的Linux的GNU的主机= i686的Linux的-gnu --target = i686的Linux的GNU的线程模型:POSIX gcc版本4.6.3(Ubuntu的/ Linaro的4.6.3-1ubuntu5)配置:4025:$? = 0配置:4014:G ++ -V>和5克+ +:错误:无法识别的选项-VG ++:致命错误:没有输入文件汇编终止。配置:4025:$?
= 4配置:4014:G ++ -qversion>和5克+ +:错误:无法识别的选项-qversionG ++:致命错误:没有输入文件汇编终止。配置:4025:$? = 4配置:4029:检查我们是否使用GNU C ++编译器配置:4048:G ++ -c conftest.cpp>和5配置:4048:$? = 0配置:4057:结果:是配置:4066:检查是否G ++接受-g配置:4086:G ++ -c -g conftest.cpp>和5配置:4086:$? = 0配置:4127:结果:是配置:4156:检查如何运行C preprocessor配置:4187:铿锵-E conftest.c配置:4187:$? = 0配置:4201:铿锵-E conftest.c conftest.c:10:10:致命错误:'ac_nonexistent.h'文件未找到
#包括LT&;&ac_nonexistent.h GT;
         ^ 1产生错误。配置:4201:$? = 1配置:失败的计划是:| / * * confdefs.h / | #定义PACKAGE_NAME| #定义PACKAGE_TARNAME| #定义PACKAGE_VERSION| #定义PACKAGE_STRING| #定义PACKAGE_BUGREPORT| PACKAGE_URL的#define| #定义CANONICALIZATION_FOR_MATHN 1 | / *结束confdefs.h。 * / |
#包括LT&;&ac_nonexistent.h GT;配置:4226:结果:铿锵-E配置:4246:铿锵-E conftest.c配置:4246:$? = 0配置:4260:铿锵-E conftest.c conftest.c:10:10:致命错误:'ac_nonexistent.h'文件未找到
#包括LT&;&ac_nonexistent.h GT;
         ^ 1产生错误。配置:4260:$? = 1配置:失败的计划是:| / * * confdefs.h / | #定义PACKAGE_NAME| #定义PACKAGE_TARNAME| #定义PACKAGE_VERSION| #定义PACKAGE_STRING| #定义PACKAGE_BUGREPORT| PACKAGE_URL的#define| #定义CANONICALIZATION_FOR_MATHN 1 | / *结束confdefs.h。 * / |
#包括LT&;&ac_nonexistent.h GT;配置:4289:检查grep的处理排长和-e配置:4347:结果:/斌/ grep的配置:4352:检查egrep的配置:4414:结果:/斌/ grep的
-E配置:4420:检查铿锵是否需要-traditional配置:4454:结果是:没有configure:4479:检查链接是否是GNU LD配置:4491:结果:是配置:4495:检查是否铿锵接受-E -o配置:4506:铿锵-E -o conftest.i conftest.c配置:4506:$? = 0配置:4515:结果:是配置:4770:检查ranlib的配置:4786:位于/ usr / local / bin目录/ ranlib的配置:4797:结果:ranlib的配置:4862:检查AR配置:4878:位于/ usr / local / bin目录/ AR配置:4889:结果:AR配置:5000:检查的配置:5016:位于/ usr / local / bin目录/为配置:5027:结果是:作为配置:5109:检查objdump的配置:5125 :位于/ usr / local / bin目录/ objdump的配置:5136:结果:objdump的配置:5209:检查objcopy把配置:5225:位于/ usr / local / bin目录/ objcopy把配置:5236:结果:objcopy把配置:5647:检查纳米配置:5663:位于/ usr / local / bin目录/ nm的配置:5674:结果:纳米配置:5697:检查LN -s作品是否配置:5701:结果:是配置:5708:检查是否化妆套$(MAKE)配置:5730:结果:是配置:5753:检查一个BSD兼容安装配置:5821:结果:在/ usr / bin中/安装-c配置:5832:检查一个线程安全的mkdir -p配置:5871:结果:/斌/的mkdir -p配置:5889:检查点配置:5919:结果是:没有configure:5931:检查doxygen的配置:5961:结果是:没有configure:5972:检查pkg配置配置:5993:发现/ USR /斌/ pkg配置配置:6016:结果:pkg配置配置:6026:检查的ANSI C头文件配置:6046:铿锵-c -g -O2 conftest.c>和5配置:6046:$ ? = 0配置:6119:铿锵-o conftest -g -O2 conftest.c>和5配置:6119:$? = 0配置:6119:./conftest配置:6119:$? = 0配置:6130:结果:是配置:6143:检查SYS / types.h中配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查SYS / stat.h配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查stdlib.h中配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查string.h中配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查memory.h配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查strings.h配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查inttypes.h配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查stdint.h配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6143:检查unistd.h中配置:6143:铿锵-c -g -O2 conftest.c>和5配置:6143:$? = 0配置:6143:结果:是配置:6156:检查MINIX / config.h中的可用性配置:6156:铿锵-c -g -O2 conftest.c>和5 conftest.c:53:10:致命错误: MINIX / config.h'的文件未找到
#包括LT&; MINIX / config.h中>
         ^ 1产生错误。配置:6156:$? = 1配置:失败的计划是:| / * * confdefs.h / | #定义PACKAGE_NAME| #定义PACKAGE_TARNAME| #定义PACKAGE_VERSION| #定义PACKAGE_STRING| #定义PACKAGE_BUGREPORT| PACKAGE_URL的#define| #定义CANONICALIZATION_FOR_MATHN 1 | #定义STDC_HEADERS 1 |
#定义HAVE_SYS_TYPES_H 1 | #定义HAVE_SYS_STAT_H 1 | #定义HAVE_STDLIB_H 1 | #定义HAVE_STRING_H 1 | #定义HAVE_MEMORY_H 1 |
#定义HAVE_STRINGS_H 1 | #定义HAVE_INTTYPES_H 1 | #定义HAVE_STDINT_H 1 | #定义HAVE_UNISTD_H 1 | / *结束confdefs.h。 * / |
#包括LT&;&stdio.h中GT; | #IFDEF HAVE_SYS_TYPES_H | #包括LT&; SYS / types.h中> | #ENDIF | #IFDEF HAVE_SYS_STAT_H | #包括LT&; SYS / stat.h> | #ENDIF |
#IFDEF STDC_HEADERS | #包括LT&;&stdlib.h中GT; | #包括LT&;&STDDEF.H GT; | #else伪| #IFDEF HAVE_STDLIB_H | #包括LT&;&stdlib.h中GT; | #ENDIF | #ENDIF | #IFDEF HAVE_STRING_H | #!如果定义STDC_HEADERS&放大器;&安培;定义HAVE_MEMORY_H | #包括LT&;&memory.h GT; | #ENDIF | #包括LT&;&string.h中GT; | #ENDIF | #IFDEF HAVE_STRINGS_H | #包括LT&;&strings.h GT; | #ENDIF |
#IFDEF HAVE_INTTYPES_H | #包括LT&;&inttypes.h GT; | #ENDIF | #IFDEF HAVE_STDINT_H | #包括LT&;&stdint.h GT; | #ENDIF | #IFDEF HAVE_UNISTD_H |
#包括LT&;&unistd.h中GT; | #ENDIF | #包括LT&; MINIX / config.h中>配置:6156:结果是:没有configure:6156:检查MINIX / config.h中presence配置:6156:铿锵-E conftest.c conftest.c:20:10:致命错误:'MINIX / config.h'的文件未找到
#包括LT&; MINIX / config.h中>
         ^ 1产生错误。配置:6156:$? = 1配置:失败的计划是:| / * * confdefs.h / | #定义PACKAGE_NAME| #定义PACKAGE_TARNAME| #定义PACKAGE_VERSION| #定义PACKAGE_STRING| #定义PACKAGE_BUGREPORT| PACKAGE_URL的#define| #定义CANONICALIZATION_FOR_MATHN 1 | #定义STDC_HEADERS 1 |
#定义HAVE_SYS_TYPES_H 1 | #定义HAVE_SYS_STAT_H 1 | #定义HAVE_STDLIB_H 1 | #定义HAVE_STRING_H 1 | #定义HAVE_MEMORY_H 1 |
#定义HAVE_STRINGS_H 1 | #定义HAVE_INTTYPES_H 1 | #定义HAVE_STDINT_H 1 | #定义HAVE_UNISTD_H 1 | / *结束confdefs.h。 * / |
#包括LT&; MINIX / config.h中>配置:6156:结果是:没有configure:6156:检查MINIX / config.h中配置:6156:结果是:没有configure:6177:检查是否是安全的定义__EXTENSIONS__配置:6195:铿锵-c -g -O2 conftest。 C>和5配置:6195:$? = 0配置:6202:结果:是配置:6234:检查使用物理目录配置CD:6249:结果:CD -P配置:6287:检查是否
-Wno-未使用的参数被接受配置:6310:铿锵-c -g -O2 -Wno-未使用的参数conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wno-括号中接受的配置:6310:铿锵-c -g -O2 -Wno-括号conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wno-长隆接受配置:6310:铿锵-c -g -O2 -Wno-长隆conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wno-失踪现场初始化接受配置:6310:铿锵-c -g -O2 -Wno缺失场-初始化conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查-Wpointer-ARITH是否被接受配置:6310:铛-c
-g -O2 -Wpointer-ARITH conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wwrite弦接受配置:6310:铿锵-c -g -O2 -Wwrite串conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wdeclaration-后声明接受配置:6310:铿锵-c -g -O2 -Wdeclaration-后声明conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否-Wshorten 64至32接受的配置:6310:铿锵-c -g -O2 -Wshorten 64至32 conftest.c>&放5配置:6310:$? = 0配置:6312:结果:是配置:6287:检查是否
-Wimplicit功能声明接受配置:6310:铿锵-c -g -O2 -Wimplicit功能声明conftest.c>和5配置:6310:$? = 0配置:6312:结果:是配置:6391:检查是否-Wall -Wextra接受配置:6414:铛-c -g
-O2 -Wall -Wextra conftest.c>和5配置:6414:$? = 0配置:6416:结果:是配置:6439:检查是否-ggdb接受配置:6462:铿锵-c -g -O2 -Wall -Wextra
-Wno-未使用的参数-Wno-括号-Wno-长隆-Wno缺失场 - 初始化-Wpointer-ARITH -Wwrite弦-Wdeclaration-后声明-Wshorten 64至32 -Wimplicit功能-declaration -ggdb conftest.c>和5配置:6462:$? = 0配置:6464:结果:是配置:6551:铿锵-c -g -O2 conftest.c>和5配置:6551:$? = 0配置:6559:检查是否
-fvisibility =隐藏接受配置:6582:铿锵-c -g -O2 -Wall -Wextra -Wno-未使用的参数-Wno-括号-Wno-长隆-Wno缺失场 - 初始化-Wpointer-ARITH - Wwrite弦-Wdeclaration-后声明-Wshorten 64至32 -Wimplicit功能声明-fvisibility =隐藏conftest.c>和5配置:6582:$? = 0配置:6584:结果:是配置:6731:检查所需要的大文件的特殊的C编译器选项配置:6776:结果是:没有configure:6782:检查
_FILE_OFFSET_BITS需要对大文件的价值配置:6807:铿锵-c -O3 -ggdb conftest.c>和5 conftest.c:8:23:警告:移位计数> =类型宽度[-Wshift-计数溢出]


解决方案

日志不会说谎! configure.log是什么,我需要找到问题的根源。问题是这样的:


  

海湾合作委员会检查C编译器是否工作......没有


简单的答案,这就是

 命令和apt-get安装铛和放大器;&安培; RVM安装1.9.3 --with-GCC =铛

完美的作品!

I get the following error while trying to install Ruby 1.9.3 on Trisquel 6 using the following command rvm install 1.9.3

ERROR

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

My configure.log is shown pasted below

[2013-09-18 20:36:16] ./configure current path:
/home/joshua/.rvm/src/ruby-1.9.3-p448 command(4): ./configure --prefix=/home/joshua/.rvm/rubies/ruby-1.9.3-p448 --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/joshua/.rvm/src/ruby-1.9.3-p448': configure: error: C compiler cannot create executables See `config.log' for more details

config.log file

This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was generated by GNU Autoconf 2.69. Invocation command line was

  $ ./configure --prefix=/home/joshua/.rvm/rubies/ruby-1.9.3-p448
--with-gcc=clang --disable-install-doc --enable-shared

## --------- ##
## Platform. ##
## --------- ##

hostname = trisquel6 uname -m = i686 uname -r = 3.2.0-52-generic-pae uname -s = Linux uname -v = #0trisquel1 SMP Thu Aug 22 22:04:28 UTC 2013

/usr/bin/uname -p = unknown /bin/uname -X     = unknown

/bin/arch              = unknown /usr/bin/arch -k       = unknown /usr/convex/getsysinfo = unknown /usr/bin/hostinfo      = unknown /bin/machine           = unknown /usr/bin/oslevel       = unknown /bin/universe          = unknown

PATH: /usr/local/bin PATH: /usr/bin PATH: /bin PATH: /usr/games PATH: /media/allihave/jdkversions/jdk1.7.0_40/bin PATH: /media/allihave/frameworks/apacheAnt/apache-ant-1.9.2/bin PATH: /media/allihave/frameworks/play/play-2.1.0 PATH: /media/allihave/frameworks/scala-2.10.0/bin PATH: /media/allihave/frameworks/clojure/dev/bin PATH: /opt/lampp/bin PATH: /media/allihave/bashincludes PATH: /media/allihave/bashincludes/google_appengine PATH: /home/joshua/.rvm/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2799: checking build system type configure:2813: result: i686-pc-linux-gnu configure:2881: checking host system type configure:2894: result: i686-pc-linux-gnu configure:2914: checking target system type configure:2927: result: i686-pc-linux-gnu configure:3408: checking for C compiler version configure:3417: clang
--version >&5 Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: i386-pc-linux-gnu Thread model: posix configure:3428: $? = 0 configure:3417: clang -v
>&5 Ubuntu clang version 3.0-6ubuntu3 (tags/RELEASE_30/final) (based on LLVM 3.0) Target: i386-pc-linux-gnu Thread model: posix configure:3428: $? = 0 configure:3417: clang -V >&5 clang: error: argument to '-V' is missing (expected 1 value) clang: error: no input files configure:3428: $? = 1 configure:3417: clang -qversion >&5 clang: error: no input files configure:3428: $? = 1 configure:3448: checking whether the C compiler works configure:3470: clang    conftest.c  >&5 configure:3474: $? = 0 configure:3522: result: yes configure:3525: checking for C compiler default output file name configure:3527: result: a.out configure:3533: checking for suffix of executables configure:3540: clang -o conftest    conftest.c  >&5 configure:3544: $? = 0 configure:3566: result:  configure:3588: checking whether we are cross compiling configure:3596: clang -o conftest    conftest.c  >&5 configure:3600: $? = 0 configure:3607: ./conftest configure:3611: $? = 0 configure:3626: result: no configure:3631: checking for suffix of object files configure:3653: clang -c   conftest.c >&5 configure:3657: $? = 0 configure:3678: result: o configure:3682: checking whether we are using the GNU C compiler configure:3701: clang -c   conftest.c >&5 configure:3701: $?
= 0 configure:3710: result: yes configure:3719: checking whether clang accepts -g configure:3739: clang -c -g  conftest.c >&5 configure:3739: $? = 0 configure:3780: result: yes configure:3797: checking for clang option to accept ISO C89 configure:3860: clang  -c -g -O2  conftest.c
>&5 configure:3860: $? = 0 configure:3873: result: none needed configure:3951: checking for g++ configure:3967: found /usr/bin/g++ configure:3978: result: g++ configure:4005: checking for C++ compiler version configure:4014: g++ --version >&5 g++ (Ubuntu/Linaro
4.6.3-1ubuntu5) 4.6.3 Copyright (C) 2011 Free Software Foundation, Inc. This is free software; see the source for copying conditions.  There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4025: $? = 0 configure:4014: g++ -v >&5 Using built-in specs. COLLECT_GCC=g++ COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-linux-gnu/4.6/lto-wrapper Target: i686-linux-gnu Configured with: ../src/configure -v
--with-pkgversion='Ubuntu/Linaro 4.6.3-1ubuntu5' --with-bugurl=file:///usr/share/doc/gcc-4.6/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.6 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.6 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --enable-targets=all --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=i686-linux-gnu --host=i686-linux-gnu --target=i686-linux-gnu Thread model: posix gcc version 4.6.3 (Ubuntu/Linaro 4.6.3-1ubuntu5)  configure:4025: $? = 0 configure:4014: g++ -V >&5 g++: error: unrecognized option '-V' g++: fatal error: no input files compilation terminated. configure:4025: $?
= 4 configure:4014: g++ -qversion >&5 g++: error: unrecognized option '-qversion' g++: fatal error: no input files compilation terminated. configure:4025: $? = 4 configure:4029: checking whether we are using the GNU C++ compiler configure:4048: g++ -c   conftest.cpp >&5 configure:4048: $? = 0 configure:4057: result: yes configure:4066: checking whether g++ accepts -g configure:4086: g++ -c -g  conftest.cpp >&5 configure:4086: $? = 0 configure:4127: result: yes configure:4156: checking how to run the C preprocessor configure:4187: clang -E  conftest.c configure:4187: $? = 0 configure:4201: clang -E  conftest.c conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
         ^ 1 error generated. configure:4201: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define CANONICALIZATION_FOR_MATHN 1 | /* end confdefs.h.  */ |
#include <ac_nonexistent.h> configure:4226: result: clang -E configure:4246: clang -E  conftest.c configure:4246: $? = 0 configure:4260: clang -E  conftest.c conftest.c:10:10: fatal error: 'ac_nonexistent.h' file not found
#include <ac_nonexistent.h>
         ^ 1 error generated. configure:4260: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define CANONICALIZATION_FOR_MATHN 1 | /* end confdefs.h.  */ |
#include <ac_nonexistent.h> configure:4289: checking for grep that handles long lines and -e configure:4347: result: /bin/grep configure:4352: checking for egrep configure:4414: result: /bin/grep
-E configure:4420: checking whether clang needs -traditional configure:4454: result: no configure:4479: checking whether the linker is GNU ld configure:4491: result: yes configure:4495: checking whether clang -E accepts -o configure:4506: clang -E -o conftest.i conftest.c configure:4506: $? = 0 configure:4515: result: yes configure:4770: checking for ranlib configure:4786: found /usr/local/bin/ranlib configure:4797: result: ranlib configure:4862: checking for ar configure:4878: found /usr/local/bin/ar configure:4889: result: ar configure:5000: checking for as configure:5016: found /usr/local/bin/as configure:5027: result: as configure:5109: checking for objdump configure:5125: found /usr/local/bin/objdump configure:5136: result: objdump configure:5209: checking for objcopy configure:5225: found /usr/local/bin/objcopy configure:5236: result: objcopy configure:5647: checking for nm configure:5663: found /usr/local/bin/nm configure:5674: result: nm configure:5697: checking whether ln -s works configure:5701: result: yes configure:5708: checking whether make sets $(MAKE) configure:5730: result: yes configure:5753: checking for a BSD-compatible install configure:5821: result: /usr/bin/install -c configure:5832: checking for a thread-safe mkdir -p configure:5871: result: /bin/mkdir -p configure:5889: checking for dot configure:5919: result: no configure:5931: checking for doxygen configure:5961: result: no configure:5972: checking for pkg-config configure:5993: found /usr/bin/pkg-config configure:6016: result: pkg-config configure:6026: checking for ANSI C header files configure:6046: clang -c -g -O2  conftest.c >&5 configure:6046: $? = 0 configure:6119: clang -o conftest -g -O2   conftest.c  >&5 configure:6119: $? = 0 configure:6119: ./conftest configure:6119: $? = 0 configure:6130: result: yes configure:6143: checking for sys/types.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for sys/stat.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for stdlib.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for string.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for memory.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for strings.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for inttypes.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for stdint.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6143: checking for unistd.h configure:6143: clang -c -g -O2  conftest.c >&5 configure:6143: $? = 0 configure:6143: result: yes configure:6156: checking minix/config.h usability configure:6156: clang -c -g -O2  conftest.c >&5 conftest.c:53:10: fatal error: 'minix/config.h' file not found
#include <minix/config.h>
         ^ 1 error generated. configure:6156: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define CANONICALIZATION_FOR_MATHN 1 | #define STDC_HEADERS 1 |
#define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 |
#define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h.  */ |
#include <stdio.h> | #ifdef HAVE_SYS_TYPES_H | # include <sys/types.h> | #endif | #ifdef HAVE_SYS_STAT_H | # include <sys/stat.h> | #endif |
#ifdef STDC_HEADERS | # include <stdlib.h> | # include <stddef.h> | #else | # ifdef HAVE_STDLIB_H | #  include <stdlib.h> | # endif | #endif | #ifdef HAVE_STRING_H | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H | #  include <memory.h> | # endif | # include <string.h> | #endif | #ifdef HAVE_STRINGS_H | # include <strings.h> | #endif |
#ifdef HAVE_INTTYPES_H | # include <inttypes.h> | #endif | #ifdef HAVE_STDINT_H | # include <stdint.h> | #endif | #ifdef HAVE_UNISTD_H |
# include <unistd.h> | #endif | #include <minix/config.h> configure:6156: result: no configure:6156: checking minix/config.h presence configure:6156: clang -E  conftest.c conftest.c:20:10: fatal error: 'minix/config.h' file not found
#include <minix/config.h>
         ^ 1 error generated. configure:6156: $? = 1 configure: failed program was: | /* confdefs.h */ | #define PACKAGE_NAME "" | #define PACKAGE_TARNAME "" | #define PACKAGE_VERSION "" | #define PACKAGE_STRING "" | #define PACKAGE_BUGREPORT "" | #define PACKAGE_URL "" | #define CANONICALIZATION_FOR_MATHN 1 | #define STDC_HEADERS 1 |
#define HAVE_SYS_TYPES_H 1 | #define HAVE_SYS_STAT_H 1 | #define HAVE_STDLIB_H 1 | #define HAVE_STRING_H 1 | #define HAVE_MEMORY_H 1 |
#define HAVE_STRINGS_H 1 | #define HAVE_INTTYPES_H 1 | #define HAVE_STDINT_H 1 | #define HAVE_UNISTD_H 1 | /* end confdefs.h.  */ |
#include <minix/config.h> configure:6156: result: no configure:6156: checking for minix/config.h configure:6156: result: no configure:6177: checking whether it is safe to define __EXTENSIONS__ configure:6195: clang -c -g -O2  conftest.c >&5 configure:6195: $? = 0 configure:6202: result: yes configure:6234: checking for cd using physical directory configure:6249: result: cd -P configure:6287: checking whether
-Wno-unused-parameter is accepted configure:6310: clang -c -g -O2  -Wno-unused-parameter  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wno-parentheses is accepted configure:6310: clang -c -g -O2  -Wno-parentheses  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wno-long-long is accepted configure:6310: clang -c -g -O2  -Wno-long-long  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wno-missing-field-initializers is accepted configure:6310: clang -c -g -O2  -Wno-missing-field-initializers  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether -Wpointer-arith is accepted configure:6310: clang -c
-g -O2  -Wpointer-arith  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wwrite-strings is accepted configure:6310: clang -c -g -O2  -Wwrite-strings  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wdeclaration-after-statement is accepted configure:6310: clang -c -g -O2  -Wdeclaration-after-statement  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether -Wshorten-64-to-32 is accepted configure:6310: clang -c -g -O2  -Wshorten-64-to-32  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6287: checking whether
-Wimplicit-function-declaration is accepted configure:6310: clang -c -g -O2  -Wimplicit-function-declaration  conftest.c >&5 configure:6310: $? = 0 configure:6312: result: yes configure:6391: checking whether -Wall -Wextra is accepted configure:6414: clang -c -g
-O2  -Wall -Wextra  conftest.c >&5 configure:6414: $? = 0 configure:6416: result: yes configure:6439: checking whether -ggdb is accepted configure:6462: clang -c -g -O2 -Wall -Wextra
-Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -ggdb  conftest.c >&5 configure:6462: $? = 0 configure:6464: result: yes configure:6551: clang -c -g -O2  conftest.c >&5 configure:6551: $? = 0 configure:6559: checking whether
-fvisibility=hidden is accepted configure:6582: clang -c -g -O2 -Wall -Wextra -Wno-unused-parameter -Wno-parentheses -Wno-long-long -Wno-missing-field-initializers -Wpointer-arith -Wwrite-strings -Wdeclaration-after-statement -Wshorten-64-to-32 -Wimplicit-function-declaration -fvisibility=hidden  conftest.c >&5 configure:6582: $? = 0 configure:6584: result: yes configure:6731: checking for special C compiler options needed for large files configure:6776: result: no configure:6782: checking for
_FILE_OFFSET_BITS value needed for large files configure:6807: clang -c  -O3 -ggdb    conftest.c >&5 conftest.c:8:23: warning: shift count >= width of type [-Wshift-count-overflow]

解决方案

Logs don't lie! configure.log is what i need to get to the root of the problem. The issue is this:

gcc checking whether the C compiler works... no

The simple answer to this is just

sudo apt-get install clang && rvm install 1.9.3 --with-gcc=clang

Works perfectly!

这篇关于配置:错误:安装Ruby 1.9.3时,C编译器不能创建可执行文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆