drlma06060 2013-09-08 12:46
浏览 181
已采纳

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

I am trying to install PHP PDO_ODBC which i downloaded from PECL and i get the following error while running the configure command using

  ./configure --with-apxs=/opt/lampp/bin/apxs --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/

I am running the command as root and i am on a

Linux trisquel6 3.2.0-52-generic-pae #0trisquel1 SMP Thu Aug 22 22:04:28 UTC 2013 i686 i686 i386 GNU/Linux

My config.log file is pasted below

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.68.  Invocation command line was

  $ ./configure --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/

## --------- ##
## 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/sbin
PATH: /usr/local/bin
PATH: /usr/sbin
PATH: /usr/bin
PATH: /sbin
PATH: /bin


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

configure:2293: checking for grep that handles long lines and -e
configure:2351: result: /bin/grep
configure:2356: checking for egrep
configure:2418: result: /bin/grep -E
configure:2423: checking for a sed that does not truncate output
configure:2477: result: /bin/sed
configure:2609: checking for cc
configure:2625: found /usr/bin/cc
configure:2636: result: cc
configure:2667: checking for C compiler version
configure:2676: cc --version >&5
cc (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:2687: $? = 0
configure:2676: cc -v >&5
Using built-in specs.
COLLECT_GCC=cc
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:2687: $? = 0
configure:2676: cc -V >&5
cc: error: unrecognized option '-V'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 4
configure:2676: cc -qversion >&5
cc: error: unrecognized option '-qversion'
cc: fatal error: no input files
compilation terminated.
configure:2687: $? = 4
configure:2707: checking whether the C compiler works
configure:2729: cc    conftest.c  >&5
/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: ld returned 1 exit status
configure:2733: $? = 1
configure:2771: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME ""
| #define PACKAGE_TARNAME ""
| #define PACKAGE_VERSION ""
| #define PACKAGE_STRING ""
| #define PACKAGE_BUGREPORT ""
| #define PACKAGE_URL ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2776: error: in `/home/joshua/Downloads/PDO_ODBC-1.0.1/PDO_ODBC-1.0.1':
configure:2778: error: C compiler cannot create executables
See `config.log' for more details

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=
ac_cv_env_CFLAGS_value=
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_path_EGREP='/bin/grep -E'
ac_cv_path_GREP=/bin/grep
ac_cv_prog_ac_ct_CC=cc
lt_cv_path_SED=/bin/sed

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR=''
AWK=''
CC='cc'
CFLAGS=''
CONFIGURE_COMMAND=' '\''./configure'\''  '\''--with-php-config=/opt/lampp/bin/php-config'\'' '\''--with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/'\'''
CONFIGURE_OPTIONS=' '\''--with-php-config=/opt/lampp/bin/php-config'\'' '\''--with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/'\'''
CPP=''
CPPFLAGS=''
DEFS=''
DSYMUTIL=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='/bin/grep -E'
EXEEXT=''
GREP='/bin/grep'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S=''
LTLIBOBJS=''
NMEDIT=''
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB=''
RE2C=''
SED='/bin/sed'
SHELL='/bin/bash'
SHLIB_DL_SUFFIX_NAME=''
SHLIB_SUFFIX_NAME=''
STRIP=''
ac_ct_CC='cc'
bindir='${exec_prefix}/bin'
build=''
build_alias=''
build_cpu=''
build_os=''
build_vendor=''
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='NONE'
host=''
host_alias=''
host_cpu=''
host_os=''
host_vendor=''
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
prefix='NONE'
program_transform_name='s,x,x,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target=''
target_alias=''
target_cpu=''
target_os=''
target_vendor=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""

configure: exit 77
  • 写回答

1条回答 默认 最新

  • duanlei1957 2013-09-18 13:10
    关注

    The answer to this question is provided in this link

    configure: error: C compiler cannot create executables when installing Ruby 1.9.3

    doing

    sudo apt-get install clang
    

    and then

    ./configure --with-apxs=/opt/lampp/bin/apxs --with-php-config=/opt/lampp/bin/php-config --with-pdo-odbc=ibm-db2,/opt/ibm/db2/V9.7/ --with-gcc=clang
    

    Works perfectly!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥30 YOLO检测微调结果p为1
  • ¥20 求快手直播间榜单匿名采集ID用户名简单能学会的
  • ¥15 DS18B20内部ADC模数转换器
  • ¥15 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题