Apache在SUSE Linux下的源码安装配置(httpd(3)

Downloading: [S1:1][package]libapr1-devel-1.2.2-13.8.1.i586, 545.7 K(4.6 M unpac                                                                                                                                                             ked)

Installing: [S1:1][package]libapr1-devel-1.2.2-13.8.1.i586

Downloading: [S1:1][package]libapr-util1-devel-1.2.2-13.13.18.i586, 243.6 K(2.1                                                                                                                                                              M unpacked)

Installing: [S1:1][package]libapr-util1-devel-1.2.2-13.13.18.i586

接着运行

#./configure --prefix=/usr/local/apache --enable-modules=most --enable-mods-shared=max

出现如下问题:

checking for pcre-config... false

configure: error: pcre-config for libpcre not found. PCRE is required and available from 

仍然用zypper安装

linux-ku0s:/home/archerwu/code/httpd-2.4.2 # zypper search pcre-config

正在恢复系统源…

对以下项的元数据进行语法分析SUSE Linux Enterprise Server 10 SP4...

No packages found.

没办法,只能在网上下载。

souceforge上下载了pcre-8.30.zip

直接./configure;make;make install安装

然后再#./configure --prefix=/usr/local/apache --enable-modules=most --enable-mods-shared=max

出现如下错误

checking for APR version 1.3.0 or later... no

configure: error: APR version 1.3.0 or later is required

由于系统是SLES10,对应的apr版本才1.2.2,而http版本比较新,所以改用较低版本再尝试,换成httpd-2.2.22.tar.gz

之后./configure通过,但是make的时候出错

In file included from /home/archerwu/code/httpd-2.2.22/include/util_ldap.h:31,

from exports.c:38:

/usr/include/apr-1/apr_ldap.h:67:18: error: lber.h: No such file or directory

/usr/include/apr-1/apr_ldap.h:68:18: error: ldap.h: No such file or directory

/usr/include/apr-1/apr_ldap.h:97:2: error: #error Support for LDAP v2.0 toolkits has been removed from apr-util. Please use an LDAP v3.0 toolkit.

In file included from /usr/include/apr-1/apr_ldap.h:120,

from /home/archerwu/code/httpd-2.2.22/include/util_ldap.h:31,

from exports.c:38:

/usr/include/apr-1/apr_ldap_init.h:112: error: expected declaration specifiers or '...' before 'LDAP'

In file included from /usr/include/apr-1/apr_ldap.h:121,

from /home/archerwu/code/httpd-2.2.22/include/util_ldap.h:31,

from exports.c:38:

/usr/include/apr-1/apr_ldap_option.h:204: error: expected declaration specifiers or '...' before 'LDAP'

/usr/include/apr-1/apr_ldap_option.h:226: error: expected declaration specifiers or '...' before 'LDAP'

In file included from exports.c:38:

/home/archerwu/code/httpd-2.2.22/include/util_ldap.h:89: error: 'LDAP_DEREF_NEVER' undeclared here (not in a function)

/home/archerwu/code/httpd-2.2.22/include/util_ldap.h:90: error: 'LDAP_DEREF_SEARCHING' undeclared here (not in a function)

/home/archerwu/code/httpd-2.2.22/include/util_ldap.h:91: error: 'LDAP_DEREF_FINDING' undeclared here (not in a function)

/home/archerwu/code/httpd-2.2.22/include/util_ldap.h:92: error: 'LDAP_DEREF_ALWAYS' undeclared here (not in a function)

/home/archerwu/code/httpd-2.2.22/include/util_ldap.h:97: error: expected specifier-qualifier-list before 'LDAP'

make[2]: *** [exports.lo] 错误 1

make[2]: Leaving directory `/home/archerwu/code/httpd-2.2.22/server'

make[1]: *** [all-recursive] 错误 1

make[1]: Leaving directory `/home/archerwu/code/httpd-2.2.22/server'

make: *** [all-recursive] 错误 1

估计大概是ldap没安装引起的问题,于是用zypper安装ldap

#zypper install ldapcpplib ldapcpplib-devel openldap2 openldap2-devel

然后再#make

出现如下问题

modules/http/.libs/libmod_http.a(byterange_filter.o): In function `ap_set_byterange':

byterange_filter.c:(.text+0x1201): undefined reference to `apr_array_clear'

collect2: ld returned 1 exit status

make[1]: *** [httpd] 错误 1

make[1]: Leaving directory `/home/archerwu/code/httpd-2.2.22'

make: *** [all-recursive] 错误 1

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:http://www.heiqu.com/f6661b49364fd2eaba5864480c977905.html