2011-10-06 46 views
2

我想在我的SUSE Linux安裝Apache 2.2.21,但是當我用不同的選項來運行./configure的我獲得以下錯誤:gcc的錯誤,同時配置Apache 2.2.21

# ./configure --prefix=/opt/Apache22 --enable-ssl --enable-logio --with-ssl=/opt/ssl 

checking for chosen layout... Apache 
checking for working mkdir -p... yes 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking target system type... x86_64-unknown-linux-gnu 

Configuring Apache Portable Runtime library ... 

checking for APR... reconfig 
configuring package in srclib/apr now 
checking build system type... x86_64-unknown-linux-gnu 
checking host system type... x86_64-unknown-linux-gnu 
checking target system type... x86_64-unknown-linux-gnu 
Configuring APR library 
Platform: x86_64-unknown-linux-gnu 
checking for working mkdir -p... yes 
APR Version: 1.4.5 
checking for chosen layout... apr 
checking for gcc... gcc 
checking for C compiler default output file name... 
configure: error: in `/opt/httpd-2.2.21/srclib/apr': 
configure: error: C compiler cannot create executables 
See `config.log' for more details. 
configure failed for srclib/apr 

這裏是正確的日誌文件。 sry回合...

該文件包含編譯器產生的任何消息,而 運行配置,以幫助調試,如果配置出錯。

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

    $ /opt/httpd-2.2.21/srclib/apr/configure --disable-option-checking --prefix=/opt/Apache22 --cache-file=/dev/null --srcdir=/opt/httpd-2.2.21/srclib/apr --prefix=/opt/Apache22 --exec-prefix=/opt/Apache22 --libdir=${prefix}/lib --includedir=/opt/Apache22/include --bindir=${prefix}/bin --datadir=/opt/Apache22 --with-installbuilddir=${prefix}/build 

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

hostname = sap9 
uname -m = x86_64 
uname -r = 2.6.16.60-0.54.5-default 
uname -s = Linux 
uname -v = #1 Fri Sep 4 01:28:03 UTC 2009 

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

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

PATH: /opt/TradeXpress5/users/editest/bin 
PATH: /opt/TradeXpress5/bin 
PATH: /opt/TradeXpress5/bin/runner/bin 
PATH: /usr/sbin 
PATH: /bin 
PATH: /usr/bin 
PATH: /sbin 
PATH: /usr/local/bin 
PATH: /usr/bin/X11 


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

configure:3787: checking build system type 
configure:3801: result: x86_64-unknown-linux-gnu 
configure:3821: checking host system type 
configure:3834: result: x86_64-unknown-linux-gnu 
configure:3854: checking target system type 
configure:3867: result: x86_64-unknown-linux-gnu 
configure:3930: checking for working mkdir -p 
configure:3946: result: yes 
configure:4038: checking for chosen layout 
configure:4040: result: apr 
configure:4305: checking for gcc 
configure:4321: found /usr/bin/gcc 
configure:4332: result: gcc 
configure:4561: checking for C compiler version 
configure:4570: gcc --version >&5 
gcc (GCC) 4.1.2 20070115 (SUSE Linux) 
Copyright (C) 2006 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:4581: $? = 0 
configure:4570: gcc -v >&5 
Using built-in specs. 
Target: x86_64-suse-linux 
Configured with: ../configure --enable-threads=posix --prefix=/usr --with-local-prefix=/usr/local --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib64 --libexecdir=/usr/lib64 --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.1.2 --enable-ssp --disable-libssp --disable-libgcj --with-slibdir=/lib64 --with-system-zlib --enable-shared --enable-__cxa_atexit --enable-libstdcxx-allocator=new --program-suffix= --enable-version-specific-runtime-libs --without-system-libunwind --with-cpu=generic --host=x86_64-suse-linux 
Thread model: posix 
gcc version 4.1.2 20070115 (SUSE Linux) 
configure:4581: $? = 0 
configure:4570: gcc -V >&5 
gcc: '-V' option must have argument 
configure:4581: $? = 1 
configure:4570: gcc -qversion >&5 
gcc: unrecognized option '-qversion' 
gcc: no input files 
configure:4581: $? = 1 
configure:4603: checking for C compiler default output file name 
configure:4625: gcc conftest.c >&5 
/lib64/libc.so.6: file not recognized: File format not recognized 
collect2: ld returned 1 exit status 
configure:4629: $? = 1 
configure:4666: result: 
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. */ 
| #include <stdio.h> 
| int 
| main() 
| { 
| FILE *f = fopen ("conftest.out", "w"); 
| return ferror (f) || fclose (f) != 0; 
| 
| ; 
| return 0; 
| } 
configure:4672: error: in `/opt/httpd-2.2.21/srclib/apr': 
configure:4676: error: C compiler cannot create executables 
See `config.log' for more details. 

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

ac_cv_build=x86_64-unknown-linux-gnu 
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= 
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_F77_set= 
ac_cv_env_F77_value= 
ac_cv_env_FFLAGS_set= 
ac_cv_env_FFLAGS_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_host=x86_64-unknown-linux-gnu 
ac_cv_mkdir_p=yes 
ac_cv_prog_ac_ct_CC=gcc 
ac_cv_target=x86_64-unknown-linux-gnu 

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

ALLOCA='' 
APR_CONFIG_LOCATION='source' 
APR_DOTTED_VERSION='1.4.5' 
APR_LIBNAME='' 
APR_MAJOR_VERSION='1' 
AR='' 
AS='' 
ASCPP='' 
AWK='' 
CC='gcc' 
CFLAGS='' 
CPP='' 
CPPFLAGS='' 
CXX='' 
CXXCPP='' 
CXXFLAGS='' 
DEFAULT_OSDIR='' 
DEFS='' 
DLLTOOL='' 
DSYMUTIL='' 
ECHO='echo' 
ECHO_C='' 
ECHO_N='-n' 
ECHO_T='' 
EGREP='' 
EXEEXT='' 
EXTRA_CFLAGS='' 
EXTRA_CPPFLAGS='' 
EXTRA_INCLUDES='' 
EXTRA_LDFLAGS='' 
EXTRA_LIBS='' 
F77='' 
FFLAGS='' 
GREP='' 
INCLUDES='' 
INCLUDE_OUTPUTS='' 
INCLUDE_RULES='' 
INSTALL_DATA='' 
INSTALL_PROGRAM='' 
INSTALL_SCRIPT='' 
INSTALL_SUBDIRS='' 
LDFLAGS='' 
LDLIBS='' 
LIBOBJS='' 
LIBS='' 
LIBTOOL='' 
LIBTOOL_LIBS='' 
LN_S='' 
LTFLAGS='' 
LTLIBOBJS='' 
LT_LDFLAGS='' 
LT_NO_INSTALL='' 
LT_VERSION='' 
MKDEP='' 
NMEDIT='' 
NOTEST_CFLAGS='' 
NOTEST_CPPFLAGS='' 
NOTEST_INCLUDES='' 
NOTEST_LDFLAGS='' 
NOTEST_LIBS='' 
OBJDUMP='' 
OBJECTS_PLATFORM='' 
OBJEXT='' 
OSDIR='' 
PACKAGE_BUGREPORT='' 
PACKAGE_NAME='' 
PACKAGE_STRING='' 
PACKAGE_TARNAME='' 
PACKAGE_URL='' 
PACKAGE_VERSION='' 
PATH_SEPARATOR=':' 
RANLIB='' 
RM='' 
SED='' 
SET_MAKE='' 
SHELL='/bin/sh' 
STRIP='' 
ac_ct_CC='gcc' 
ac_ct_CXX='' 
ac_ct_F77='' 
acceptfilter='' 
apr_builddir='/opt/httpd-2.2.21/srclib/apr' 
apr_builders='/opt/httpd-2.2.21/srclib/apr/build' 
apr_charset_ebcdic='' 
apr_has_user='' 
apr_has_xthread_files='' 
apr_inaddr_none='' 
apr_procattr_user_set_requires_password='' 
apr_srcdir='/opt/httpd-2.2.21/srclib/apr' 
apr_tcp_nopush_flag='' 
apr_thread_func='' 
aprdso='' 
aprlfs='' 
arpa_ineth='' 
bigendian='' 
bindir='${prefix}/bin' 
build='x86_64-unknown-linux-gnu' 
build_alias='' 
build_cpu='x86_64' 
build_os='linux-gnu' 
build_vendor='unknown' 
conioh='' 
crypth='' 
ctypeh='' 
datadir='/opt/Apache22' 
datarootdir='${prefix}/share' 
direnth='' 
docdir='${datarootdir}/doc/${PACKAGE}' 
dvidir='${docdir}' 
eolstr='' 
errnoh='' 
exec_prefix='/opt/Apache22' 
export_lib_target='' 
fcntlh='' 
fcntlser='' 
file_as_socket='' 
flockser='' 
fork='' 
hasfcntlser='' 
hasflockser='' 
hasposixser='' 
hasprocpthreadser='' 
hassysvser='' 
have_corkable_tcp='' 
have_getrlimit='' 
have_in_addr='' 
have_inet_addr='' 
have_inet_network='' 
have_iovec='' 
have_ipv6='' 
have_memchr='' 
have_memmove='' 
have_proc_invoked='' 
have_sa_storage='' 
have_sctp='' 
have_setrlimit='' 
have_sigaction='' 
have_sigsuspend='' 
have_sigwait='' 
have_strcasecmp='' 
have_strdup='' 
have_stricmp='' 
have_strncasecmp='' 
have_strnicmp='' 
have_strstr='' 
have_unicode_fs='' 
have_union_semun='' 
havebeosarea='' 
havemmapanon='' 
havemmapshm='' 
havemmaptmp='' 
havemmapzero='' 
haveos2shm='' 
haveshmget='' 
haveshmgetanon='' 
havewin32shm='' 
host='x86_64-unknown-linux-gnu' 
host_alias='' 
host_cpu='x86_64' 
host_os='linux-gnu' 
host_vendor='unknown' 
htmldir='${docdir}' 
includedir='/opt/Apache22/include' 
infodir='${datarootdir}/info' 
ino_t_value='' 
installbuilddir='${datadir}/build-${APR_MAJOR_VERSION}' 
int64_literal='' 
int64_t_fmt='' 
int64_value='' 
int_value='' 
ioh='' 
lib_target='' 
libdir='${prefix}/lib' 
libexecdir='${exec_prefix}/modules' 
limitsh='' 
link='' 
localedir='${datarootdir}/locale' 
localstatedir='${prefix}' 
long_value='' 
lt_compile='' 
mandir='${prefix}/man' 
mmap='' 
netdbh='' 
netinet_inh='' 
netinet_sctp_uioh='' 
netinet_sctph='' 
netinet_tcph='' 
o_nonblock_inherited='' 
oc='' 
off_t_fmt='' 
off_t_value='' 
oldincludedir='/usr/include' 
osuuid='' 
pdfdir='${docdir}' 
pid_t_fmt='' 
posixser='' 
prefix='/opt/Apache22' 
proc_mutex_is_global='' 
processh='' 
proclockglobal='' 
procpthreadser='' 
program_transform_name='s,x,x,' 
psdir='${docdir}' 
pthreadh='' 
pthreadser='' 
rand='' 
sbindir='${exec_prefix}/bin' 
semaphoreh='' 
sendfile='' 
sharedmem='' 
sharedstatedir='${prefix}/com' 
shlibpath_var='' 
short_value='' 
signalh='' 
size_t_fmt='' 
size_t_value='' 
so_ext='' 
socklen_t_value='' 
ssize_t_fmt='' 
ssize_t_value='' 
stdargh='' 
stdint='' 
stdioh='' 
stdlibh='' 
stringh='' 
stringsh='' 
struct_rlimit='' 
sys_ioctlh='' 
sys_sendfileh='' 
sys_signalh='' 
sys_socketh='' 
sys_sockioh='' 
sys_syslimitsh='' 
sys_timeh='' 
sys_typesh='' 
sys_uioh='' 
sys_unh='' 
sys_waith='' 
sysconfdir='${prefix}/conf' 
sysvser='' 
target='x86_64-unknown-linux-gnu' 
target_alias='' 
target_cpu='x86_64' 
target_os='linux-gnu' 
target_vendor='unknown' 
tcp_nodelay_inherited='' 
threads='' 
timeh='' 
top_builddir='/opt/httpd-2.2.21/srclib/apr' 
uint64_literal='' 
uint64_t_fmt='' 
uint64_t_hex_fmt='' 
unistdh='' 
usebeosarea='' 
usemmapanon='' 
usemmapshm='' 
usemmaptmp='' 
usemmapzero='' 
useos2shm='' 
useshmget='' 
useshmgetanon='' 
usewin32shm='' 
voidp_size='' 
windowsh='' 
winsock2h='' 

## ----------- ## 
## 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 

它可能有做:

/lib64/libc.so.6: file not recognized: File format not recognized 

GCC坐落在/ usr/bin中/ gcc的,但我不認爲這個問題是沒有找到它的./config中。這可能是因爲在系統上安裝了新版本的glibc beeing?如果是這樣的話this would be my root problem如果你願意。

請幫忙。 thx almightybob

+0

我很確定我們在這裏查看錯誤的config.log。 「配置srclib/apr失敗」,所以你可以請張貼srclib/apr/config.log? – thiton

+0

omg你的權利,我覺得愚蠢。經過一天的工作,很難保持警惕 – almightyBob

+0

爲什麼要從源代碼構建像Apache這樣的標準軟件? SuSE是否不提供軟件包?這是什麼瘋狂? 編輯:哇,我只注意到那裏列出的淫穢的舊內核和編譯器版本。你真的計劃在這個服務器上運行嗎?兩年內未修補的內核在其中會有很多安全漏洞。如果攻擊者得到任何立足點,那麼就搞砸了。 – Novelocrat

回答

1

我升級了binutils,解決了這個問題。

0

我會想象它可能是由於`target_vendor ='unknown'的值未知。那將是我的第一停靠港。

0

與依賴和從屬模塊再次安裝GCC如下圖所示,再次的./configure嘗試解決上述問題

# rpm -ivh gcc-4.1.2-14.el5.i386.rpm glibc-devel-2.5-18.i386.rpm glibc-headers-2.5-18.i38 
6.rpm kernel-headers-2.6.18-53.el5.i386.rpm 
Preparing...    ########################################### [100%] 
1:kernel-headers   ########################################### [ 25%] 
2:glibc-headers   ########################################### [ 50%] 
3:glibc-devel   ########################################### [ 75%] 
4:gcc     ########################################### [100%] 
0

確保您已經編譯和之前建立PCRE,APR和APR-UTIL配置Apache。