- 论坛徽章:
- 0
|
前一段时间公司要用apache设置一个反向代理,无论如何也安装不上,我对apache不熟悉,弄了好久,终于搞定。
首先要感谢深圳技术支持部的王大海,他给了我十分关键的帮助,另外十分感谢版主sdccf,他在夜里还帮我测试apache的编译问题。没有他们的帮助我是解决不了这个问题的。
这是配置参数
# ./configure --prefix=/opt/apache --enable-module=most --enable-shared=max --en
able-module=proxy --enable-shared=proxy --enable-module=rewrite --enable-shared=
rewrite
下边是我遇到的错误,至今我也没能真正弄懂,如果那位朋友能给我详细讲讲出错的原因,不胜感激!
环境 sco 506 apache1.3.27 gcc是SCO SKUNKWARE光盘中的,后来又改用cc
错误1
# env
ENV=${_ENVFILE[(_=1)+(_$-=0)-_${-%%*i*}]}
HOME=/
HUSHLOGIN=FALSE
HZ=100
LOGNAME=root
MAIL=/usr/spool/mail/root
PATH=/bin:/etc:/usr/bin:tcb/bin:/opt/K/SKUNK2000/Gcc/2.95.2pl1/usr/local/bin
SHELL=/bin/sh
TERM=vt100
TZ=CST-8
_ENVFILE=/.kshrc
#
# ./configure --prefix=/opt/apache --enable-module=most --enable-shared=max --en
able-module=proxy --enable-shared=proxy --enable-module=rewrite --enable-shared=
rewrite
Configuring for Apache, Version 1.3.27
+ using installation path layout: Apache (config.layout)
Creating Makefile
Creating Configuration.apaci in src
+ enabling mod_so for DSO support
Creating Makefile in src
+ configured for SCO 5 platform
+ setting C compiler to gcc
+ setting C pre-processor to NOT-AVAILABLE
+ checking for system header files
+ adding selected modules
o rewrite_module uses ConfigStart/End
disabling DBM support for mod_rewrite
(perhaps you need to add -ldbm, -lndbm or -lgdbm to EXTRA_LIBS)
o dbm_auth_module uses ConfigStart/End
+ using builtin Expat
+ checking sizeof various data types
+ doing sanity check on compiler and options
** A test compilation with your Makefile configuration
** failed. The below error output from the compilation
** test will give you an idea what is failing. Note that
** Apache requires an ANSI C Compiler, such as gcc.
======== Error Output for sanity check ========
cd ..; gcc -DSCO5 -DNO_DBM_REWRITEMAP -DUSE_EXPAT -I./lib/expat-lite `.
/apaci` -o helpers/dummy helpers/dummy.c -lsocket -lmalloc -lprot -ltinfo
-lx -lm
cpp: installation problem, cannot exec `cpp': Arg list too long
*** Error code 1 (bu21)
============= End of Error Report =============
Aborting!#
编译错误
错误2
# make
===>; src
make[1]: Entering directory `/apache_1.3.27'
make[2]: Entering directory `/apache_1.3.27/src'
===>; src/regex
make[3]: Nothing to be done for `all'.
<=== src/regex
===>; src/os/unix
make[3]: Nothing to be done for `all'.
<=== src/os/unix
===>; src/ap
make[3]: Nothing to be done for `all'.
<=== src/ap
===>; src/main
make[3]: Nothing to be done for `all'.
<=== src/main
===>; src/lib
===>; src/lib/expat-lite
make[4]: Nothing to be done for `all'.
<=== src/lib/expat-lite
<=== src/lib
===>; src/modules
===>; src/modules/standard
make[4]: Nothing to be done for `all'.
<=== src/modules/standard
===>; src/modules/proxy
make[4]: Nothing to be done for `all'.
<=== src/modules/proxy
<=== src/modules
cc -c -I./os/unix -I./include -DSCO -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_E
XPAT -I./lib/expat-lite `./apaci` modules.c
cc -c -I./os/unix -I./include -DSCO -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_E
XPAT -I./lib/expat-lite `./apaci` buildmark.c
cc -DSCO -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I./lib/expat-lite `./ap
aci` -Bexport -L/usr/local/lib \
-o httpd buildmark.o modules.o modules/standard/libstandard.a main/libmain
.a ./os/unix/libos.a ap/libap.a regex/libregex.a lib/expat-lite/libexpat.a -lPW
-lsocket -lmalloc -lcrypt_i
make[2]: Leaving directory `/apache_1.3.27/src'
make[1]: Leaving directory `/apache_1.3.27'
make[1]: Entering directory `/apache_1.3.27'
===>; src/support
make[2]: Entering directory `/apache_1.3.27/src/support'
cc -DSCO -DNO_DBM_REWRITEMAP -DUSE_HSREGEX -DUSE_EXPAT -I../lib/expat-lite `../
apaci` -o logresolve -L../os/unix -L../ap logresolve.o -lm -lap -los -lPW -ls
ocket -lmalloc -lcrypt_i
undefined first referenced
symbol in file
h_errno logresolve.o
inet_ntoa logresolve.o
inet_addr logresolve.o
dn_expand /usr/lib/libsocket.a
__dn_skipname /usr/lib/libsocket.a
_getshort /usr/lib/libsocket.a
_res /usr/lib/libsocket.a
__res_init /usr/lib/libsocket.a
inet_aton /usr/lib/libsocket.a
__res_search /usr/lib/libsocket.a
__res_query /usr/lib/libsocket.a
i386ld fatal: Symbol referencing errors. No output written to logresolve
make[2]: *** [logresolve] Error 13
make[2]: Leaving directory `/apache_1.3.27/src/support'
make[1]: *** [build-support] Error 1
make[1]: Leaving directory `/apache_1.3.27'
make: *** [build] Error 2
#
错误3
# make
<=== src/modules
cc -c -I./os/unix -I./include -DSCO5 -K noinline -DUSE_EXPAT -I./lib/
expat-lite `./apaci` modules.c
cc -c -I./os/unix -I./include -DSCO5 -K noinline -DUSE_EXPAT -I./lib/
expat-lite `./apaci` buildmark.c
cc -DSCO5 -K noinline -DUSE_EXPAT -I./lib/expat-lite `./apaci` -Wl,-B
export \
-o httpd buildmark.o modules.o modules/standard/libstandard.a ma
in/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -lsocket
-lmalloc -lprot -ltinfo -lx -lm
i386ld values-Xa.o: unknown flag: Bexport
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)
#
错误4
# env.
ENV=${_ENVFILE[(_=1)+(_$-=0)-_${-%%*i*}]}
EXTRA_CFLAGS= -ldbm -lndbm
HOME=/
HUSHLOGIN=FALSE
HZ=100
LOGNAME=root
MAIL=/usr/spool/mail/root
PATH=/usr/bin:/usr/ccs/bin:/bin:/usr/local/bin
SHELL=/bin/sh
TERM=vt100
TZ=CST-8
_ENVFILE=/.kshrc
# cd /apache_1.3.27
# lf
256.sh* Makefile.tmpl con.sh* icons/
ABOUT_APACHE README conf/ logs/
Announcement README-WIN.TXT config.layout pre.sh*
INSTALL README.configure config.status* src/
LICENSE WARNING-WIN.TXT configure*
Makefile cgi-bin/ htdocs/
# make
===>; src
===>; src/os/unix
<=== src/os/unix
===>; src/ap
<=== src/ap
===>; src/main
<=== src/main
===>; src/lib
===>; src/lib/expat-lite
<=== src/lib/expat-lite
<=== src/lib
===>; src/modules
===>; src/modules/standard
<=== src/modules/standard
===>; src/modules/proxy
<=== src/modules/proxy
<=== src/modules
cc -c -I./os/unix -I./include -DSCO5 -K noinline -DNO_DBM_REWRITEMAP
-DUSE_EXPAT -I./lib/expat-lite -ldbm -lndbm `./apaci` modules.c
cc -c -I./os/unix -I./include -DSCO5 -K noinline -DNO_DBM_REWRITEMAP
-DUSE_EXPAT -I./lib/expat-lite -ldbm -lndbm `./apaci` buildmark.c
cc -DSCO5 -K noinline -DNO_DBM_REWRITEMAP -DUSE_EXPAT -I./lib/expat-lit
e -ldbm -lndbm `./apaci` -Wl,-Bexport \
-o httpd buildmark.o modules.o modules/standard/libstandard.a ma
in/libmain.a ./os/unix/libos.a ap/libap.a lib/expat-lite/libexpat.a -lsocket
-lmalloc -lprot -ltinfo -lx -lm
i386ld values-Xa.o: unknown flag: Bexport
*** Error code 1 (bu21)
*** Error code 1 (bu21)
*** Error code 1 (bu21)#
错误5 编译通过,启动出现问题
# ./apachectl start
Syntax error on line 229 of /opt/apache/conf/httpd.conf:
Cannot load /opt/apache/libexec/libproxy.so into server: dynamic linker: /opt/ap
ache/bin/httpd: relocation error: symbol not found: recv
./apachectl start: httpd could not be started# |
|