新手求助Linux问题

networkwx 2011-01-17 09:49:55
小弟将gcc从4.5.1升级4.5.2之后,./configure也不能用,提示:
configure: error: /bin/sh ./config.sub i686-pc-linux- failed

然后在网上搜索得知要使用 ./configure --build=i686-pc-linux-gnu(请高手帮忙解释一下,为什么要这样做,另外如果想只输入./configure即可执行,应该怎么操作)

继续操作后又报错:
configure: error: C compiler cannot create executables

在网上搜索了一些解答,都没有解决,请高手帮帮解决。谢谢。。

另外贴上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 memcached configure 1.4.5, which was
generated by GNU Autoconf 2.63. Invocation command line was

$ ./configure --build=i686-pc-linux-gnu

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

hostname = localhost
uname -m = i686
uname -r = 2.6.33-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Thu May 13 12:06:25 CEST 2010

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

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

PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /opt/java
PATH: /opt/java/bin
PATH: /opt/java/db/bin
PATH: /opt/java/jre/bin
PATH: /usr/bin/perlbin/site
PATH: /usr/bin/perlbin/vendor
PATH: /usr/bin/perlbin/core


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

configure:1914: checking build system type
configure:1932: result: i686-pc-linux-gnu
configure:1954: checking host system type
configure:1969: result: i686-pc-linux-gnu
configure:1991: checking target system type
configure:2006: result: i686-pc-linux-gnu
configure:2051: checking for a BSD-compatible install
configure:2119: result: /bin/install -c
configure:2130: checking whether build environment is sane
configure:2173: result: yes
configure:2198: checking for a thread-safe mkdir -p
configure:2237: result: /bin/mkdir -p
configure:2250: checking for gawk
configure:2266: found /bin/gawk
configure:2277: result: gawk
configure:2288: checking whether make sets $(MAKE)
configure:2310: result: yes
configure:2545: checking for gcc
configure:2561: found /usr/bin/gcc
configure:2572: result: gcc
configure:2804: checking for C compiler version
configure:2812: gcc --version >&5
gcc (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:2816: $? = 0
configure:2823: gcc -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/i686-pc-linux-gnu/4.5.2/lto-wrapper
Target: i686-pc-linux-gnu
Configured with: /build/src/gcc-4.5.2/configure --prefix=/usr --enable-languages=c,c++,fortran,objc,obj-c++,ada --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-gnu-unique-object --enable-lto --enable-plugin --enable-gold --with-plugin-ld=ld.gold --disable-multilib --disable-libstdcxx-pch --with-system-zlib --with-ppl --with-cloog --with-cloog-include=/usr/include/cloog-ppl --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info
Thread model: posix
gcc version 4.5.2 (GCC)
configure:2827: $? = 0
configure:2834: gcc -V >&5
gcc: '-V' option must have argument
configure:2838: $? = 1
configure:2861: checking for C compiler default output file name
configure:2883: gcc conftest.c >&5
/usr/lib/gcc/i686-pc-linux-gnu/4.5.2/cc1: error while loading shared libraries: libmpfr.so.4: cannot open shared object file: No such file or directory
configure:2887: $? = 1
configure:2925: result:
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "memcached"
| #define PACKAGE_TARNAME "memcached"
| #define PACKAGE_VERSION "1.4.5"
| #define PACKAGE_STRING "memcached 1.4.5"
| #define PACKAGE_BUGREPORT "memcached@googlegroups.com"
| #define PACKAGE "memcached"
| #define VERSION "1.4.5"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
configure:2931: error: in `/home/wangxin/tools/memcached-1.4.5':
configure:2934: error: C compiler cannot create executables
See `config.log' for more details.

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

ac_cv_build=i686-pc-linux-gnu
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=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
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-linux-gnu
ac_cv_path_install='/bin/install -c'
ac_cv_path_mkdir=/bin/mkdir
ac_cv_prog_AWK=gawk
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_make_make_set=yes
ac_cv_target=i686-pc-linux-gnu

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

ACLOCAL='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run aclocal-1.10'
AMDEPBACKSLASH=''
AMDEP_FALSE=''
AMDEP_TRUE=''
AMTAR='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run tar'
AUTOCONF='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run autoconf'
AUTOHEADER='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run autoheader'
AUTOMAKE='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run automake-1.10'
AWK='gawk'
BUILD_CACHE_FALSE=''
BUILD_CACHE_TRUE=''
BUILD_DTRACE_FALSE=''
BUILD_DTRACE_TRUE=''
BUILD_SOLARIS_PRIVS_FALSE=''
BUILD_SOLARIS_PRIVS_TRUE=''
BUILD_SPECIFICATIONS_FALSE=''
BUILD_SPECIFICATIONS_TRUE=''
CC='gcc'
CCDEPMODE=''
CFLAGS=''
CPP=''
CPPFLAGS=''
CYGPATH_W='echo'
DEFS=''
DEPDIR=''
DTRACE=''
DTRACEFLAGS=''
DTRACE_INSTRUMENT_OBJ_FALSE=''
DTRACE_INSTRUMENT_OBJ_TRUE=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP=''
ENABLE_SASL=''
ENABLE_SASL_FALSE=''
ENABLE_SASL_TRUE=''
EXEEXT=''
GREP=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='$(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LTLIBOBJS=''
MAKEINFO='${SHELL} /home/wangxin/tools/memcached-1.4.5/missing --run makeinfo'
MKDIR_P='/bin/mkdir -p'
OBJEXT=''
PACKAGE='memcached'
PACKAGE_BUGREPORT='memcached@googlegroups.com'
PACKAGE_NAME='memcached'
PACKAGE_STRING='memcached 1.4.5'
PACKAGE_TARNAME='memcached'
PACKAGE_VERSION='1.4.5'
PATH_SEPARATOR=':'
PROFILER=''
PROFILER_FLAGS=''
PROFILER_LDFLAGS=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='1.4.5'
XML2RFC=''
XSLTPROC=''
ac_ct_CC='gcc'
am__fastdepCC_FALSE=''
am__fastdepCC_TRUE=''
am__include=''
am__isrc=''
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
dvidir='${docdir}'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
install_sh='$(SHELL) /home/wangxin/tools/memcached-1.4.5/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
mkdir_p='/bin/mkdir -p'
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='i686-pc-linux-gnu'
target_alias=''
target_cpu='i686'
target_os='linux-gnu'
target_vendor='pc'

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

#define PACKAGE_NAME "memcached"
#define PACKAGE_TARNAME "memcached"
#define PACKAGE_VERSION "1.4.5"
#define PACKAGE_STRING "memcached 1.4.5"
#define PACKAGE_BUGREPORT "memcached@googlegroups.com"
#define PACKAGE "memcached"
#define VERSION "1.4.5"

configure: exit 77
...全文
194 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
Mark_meego 2011-07-14
  • 打赏
  • 举报
回复
[Quote=引用 3 楼 networkwx 的回复:]

其原因是没有libmpfr.so这个,下载装上,OK。
[/Quote]请问在哪里可以下载?
networkwx 2011-04-07
  • 打赏
  • 举报
回复
其原因是没有libmpfr.so这个,下载装上,OK。
hawk198 2011-01-18
  • 打赏
  • 举报
回复
我查了一下gcc编译选项,没有发现--build这个选项啊
这是gcc官方的configure选项http://gcc.gnu.org/install/configure.html
另外如果你要升级gcc的话,建议先从lfs开始,这样能搞清楚gcc不是一次编译完成的,是采用bootstrap的方法,一步一步脱离与原来的宿主系统的联系的
louyong0571 2011-01-17
  • 打赏
  • 举报
回复
比较下configure看看,仔细分析下,应该能明白,呵呵

19,612

社区成员

发帖
与我相关
我的任务
社区描述
系统使用、管理、维护问题。可以是Ubuntu, Fedora, Unix等等
社区管理员
  • 系统维护与使用区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧