首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 操作系统 > UNIXLINUX >

checking whether the C compiler works. no解决思路

2014-01-22 
checking whether the C compiler works... no我在安装Berkeley DB时报下面错误:checking whether the C c

checking whether the C compiler works... no
我在安装Berkeley DB时报下面错误:
checking whether the C compiler works... no
configure: error: in `/c/db-4.8.30.NC-mgw/build_unix':
configure: error: C compiler cannot create executables
See `config.log' for more details.
求大神们指点,貌似是我的GCC没安装好,但是不知道怎么安装,我这个是用MinGW+msys运行的。
还有一个问题是之前报CC: not fond command,我记得CC和GCC是一样的,所以我将GCC.exe复制一份并重新命名为CC.exe,然后创建Berkeley DB库时就报上面这个错误,不知道这会不会有关系。

这是config.log的详细内容:

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

It was created by Berkeley DB configure 4.8.30, which was
generated by GNU Autoconf 2.65.  Invocation command line was

  $ ../dist/configure --enable-mingw --enable-cxx LIBS=libwsock32,libws2_32

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

hostname = Alan32-PC
uname -m = i686
uname -r = 1.0.17(0.48/3/2)
uname -s = MINGW32_NT-6.1
uname -v = 2011-04-24 23:39

/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: .
PATH: /usr/local/bin
PATH: /mingw/bin
PATH: /bin
PATH: /c/Windows/system32
PATH: /c/Windows
PATH: /c/Windows/System32/Wbem
PATH: /c/Windows/System32/WindowsPowerShell/v1.0/
PATH: /mingw/bin
PATH: /c/GNUstep/bin
PATH: /c/GNUstep/GNUstep/System/Tools


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

configure:2900: checking build system type
configure:2914: result: i686-pc-mingw32
configure:2934: checking host system type
configure:2947: result: i686-pc-mingw32
configure:2979: checking if building in the top-level or dist directories
configure:2990: result: no
configure:3074: checking if --disable-cryptography option specified
configure:3087: result: no
configure:3091: checking if --disable-hash option specified
configure:3104: result: no
configure:3108: checking if --disable-partition option specified
configure:3121: result: no
configure:3125: checking if --disable-compression option specified
configure:3138: result: no
configure:3142: checking if --disable-mutexsupport option specified
configure:3155: result: no
configure:3159: checking if --disable-atomicsupport option specified
configure:3172: result: no
configure:3176: checking if --disable-queue option specified
configure:3189: result: no
configure:3193: checking if --disable-replication option specified
configure:3206: result: no
configure:3210: checking if --disable-statistics option specified
configure:3223: result: no
configure:3227: checking if --disable-verify option specified
configure:3240: result: no
configure:3244: checking if --enable-compat185 option specified
configure:3253: result: no
configure:3256: checking if --enable-cxx option specified
configure:3265: result: yes
configure:3268: checking if --enable-debug option specified
configure:3277: result: no
configure:3280: checking if --enable-debug_rop option specified
configure:3289: result: no
configure:3292: checking if --enable-debug_wop option specified
configure:3301: result: no
configure:3304: checking if --enable-diagnostic option specified
configure:3328: result: no
configure:3332: checking if --enable-dump185 option specified
configure:3341: result: no
configure:3344: checking if --enable-java option specified
configure:3353: result: no
configure:3356: checking if --enable-mingw option specified
configure:3365: result: yes
configure:3368: checking if --enable-o_direct option specified
configure:3377: result: no
configure:3380: checking if --enable-posixmutexes option specified
configure:3389: result: no
configure:3406: checking if --enable-rpc option specified


configure:3419: result: no
configure:3422: checking if --enable-smallbuild option specified
configure:3441: result: no
configure:3444: checking if --enable-stl option specified
configure:3456: result: no
configure:3459: checking if --enable-tcl option specified
configure:3468: result: no
configure:3471: checking if --enable-test option specified
configure:3480: result: no
configure:3483: checking if --enable-uimutexes option specified
configure:3492: result: no
configure:3495: checking if --enable-umrw option specified
configure:3504: result: no
configure:3507: checking if --with-mutex=MUTEX option specified
configure:3523: result: no
configure:3535: checking if --with-tcl=DIR option specified
configure:3545: result: no
configure:3551: checking if --with-uniquename=NAME option specified
configure:3564: result: no
configure:3662: checking for chmod
configure:3678: found /bin/chmod
configure:3689: result: chmod
configure:3756: checking for cp
configure:3772: found /bin/cp
configure:3783: result: cp
configure:3947: checking for ln
configure:3963: found /bin/ln
configure:3974: result: ln
configure:4041: checking for mkdir
configure:4057: found /bin/mkdir
configure:4068: result: mkdir
configure:4135: checking for rm
configure:4151: found /bin/rm
configure:4162: result: rm
configure:4335: checking for sh
configure:4353: found /bin/sh
configure:4365: result: /bin/sh
configure:4407: checking for a BSD-compatible install
configure:4475: result: /bin/install -c
configure:4621: checking for cc
configure:4637: found /mingw/bin/cc
configure:4648: result: cc
configure:4679: checking for C compiler version
configure:4688: cc --version >&5
cc.exe (GCC) 4.5.2
Copyright (C) 2010 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:4699: $? = 0
configure:4688: cc -v >&5
Using built-in specs.
COLLECT_GCC=C:\MinGW\bin\cc.exe
COLLECT_LTO_WRAPPER=c:/mingw/bin/../libexec/gcc/mingw32/4.5.2/lto-wrapper.exe
Target: mingw32
Configured with: ../gcc-4.5.2/configure --enable-languages=c,c++,ada,fortran,objc,obj-c++ --disable-sjlj-exceptions --with-dwarf2 --enable-shared --enable-libgomp --disable-win32-registry --enable-libstdcxx-debug --enable-version-specific-runtime-libs --disable-werror --build=mingw32 --prefix=/mingw
Thread model: win32
gcc version 4.5.2 (GCC) 
configure:4699: $? = 0
configure:4688: cc -V >&5
cc.exe: '-V' option must have argument
configure:4699: $? = 1
configure:4688: cc -qversion >&5
cc.exe: unrecognized option '-qversion'
cc.exe: no input files
configure:4699: $? = 1
configure:4719: checking whether the C compiler works
configure:4741: cc    conftest.c libwsock32,libws2_32 >&5
cc.exe: libwsock32,libws2_32: No such file or directory
configure:4745: $? = 1
configure:4783: result: no
configure: failed program was:
| /* confdefs.h */
| #define PACKAGE_NAME "Berkeley DB"
| #define PACKAGE_TARNAME "db-4.8.30"
| #define PACKAGE_VERSION "4.8.30"
| #define PACKAGE_STRING "Berkeley DB 4.8.30"
| #define PACKAGE_BUGREPORT "Oracle Technology Network Berkeley DB forum"
| #define PACKAGE_URL ""
| #define HAVE_UPGRADE_SUPPORT 1
| /* end confdefs.h.  */

| int
| main ()
| {

|   ;
|   return 0;
| }
configure:4788: error: in `/c/db-4.8.30.NC-mgw/build_unix':
configure:4792: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=i686-pc-mingw32
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=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_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=


ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_LIBS_set=set
ac_cv_env_LIBS_value=libwsock32,libws2_32
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_host=i686-pc-mingw32
ac_cv_path_ac_pt_db_cv_path_sh=/bin/sh
ac_cv_path_install='/bin/install -c'
ac_cv_prog_ac_ct_CC=cc
ac_cv_prog_ac_ct_CHMOD=chmod
ac_cv_prog_ac_ct_CP=cp
ac_cv_prog_ac_ct_LN=ln
ac_cv_prog_ac_ct_MKDIR=mkdir
ac_cv_prog_ac_ct_RM=rm
ac_pt_db_cv_path_sh=/bin/sh
db_cv_build_atomicsupport=yes
db_cv_build_compression=yes
db_cv_build_cryptography=yes
db_cv_build_hash=yes
db_cv_build_mutexsupport=yes
db_cv_build_partition=yes
db_cv_build_queue=yes
db_cv_build_replication=yes
db_cv_build_statistics=yes
db_cv_build_verify=yes
db_cv_compat185=no
db_cv_cxx=yes
db_cv_debug=no
db_cv_debug_rop=no
db_cv_debug_wop=no
db_cv_diagnostic=no
db_cv_dump185=no
db_cv_java=no
db_cv_mingw=yes
db_cv_o_direct=no
db_cv_path_sh=/bin/sh
db_cv_posixmutexes=no
db_cv_rpc=no
db_cv_smallbuild=no
db_cv_stl=no
db_cv_tcl=no
db_cv_test=no
db_cv_uimutexes=no
db_cv_umrw=no
db_cv_uniquename=no
(未发完,看下面一个回帖,不好意思,一次性发不完,报字节数超出)


[解决办法]
找不到cc的话把你安装的gcc路径加进$PATH环境变量。再看看目录的权限,也有可能是因为gcc无法创建文件

热点排行