在 RHEL 5 上安装 PCRE 32 位 - 解决 apache 2.4 安装的依赖关系

在 RHEL 5 上安装 PCRE 32 位 - 解决 apache 2.4 安装的依赖关系

我需要在 RHEL 5 上安装 Apache 2.4 32 位版本。我没有安装 64 位 apache,因为在 RHEL5 计算机上运行的应用程序需要 apache 32 位(或者这就是我由于过去的行为而认为的)。

我收到“无法读取符号”,make这可能是由于 pcre 库是 ELF 64 位,而安装预计它是 ELF 32 位

**/usr/local/lib/libpcre.so: could not read symbols: File in wrong format**
collect2: ld returned 1 exit status
make[1]: *** [httpd] Error 1
make[1]: Leaving directory `/opt/myapp/httpd-2.4.7'
make: *** [all-recursive] Error 1

Apache 2.4 的配置运行如下:

CFLAGS="-m32"; export CFLAGS
LDFLAGS="-m32"; export LDFLAGS
"./configure" \
"--prefix=/opt/myapp/apache2.4" \
"--with-mpm=worker" \
"--enable-static-support" \
"--enable-ssl=static" \
"--enable-modules=most" \
"--disable-authndbd" \
"--disable-authn-dbm" \
"--disable-dbd" \
"--enable-static-logresolve" \
"--enable-static-rotatelogs" \
"--enable-proxy=static" \
"--enable-proxyconnect=static" \
"--enable-proxy-ftp=static" \
"--enable-proxy-http=static" \
"--enable-rewrite=static" \
"--enable-so=static" \
"--with-ssl=/opt/myapp/apache2.4/openssl" \
"--host=x86_32-unknown-linux-gnu" \
"host_alias=x86_32-unknown-linux-gnu" \
"CFLAGS=-m32" \
"LDFLAGS=-m32" \
"--with-included-apr" \
"--with-pcre=/usr/local" \
"$@"

我已经安装 PCRE,没有任何错误,使用:

./configure --prefix=/usr/local --enable-pcre32

当我执行 pcretest 时,它得到这个(使用 8 位支持编译?):

$ /usr/local/bin/pcretest -C
PCRE version 8.33 2013-05-28
Compiled with
  8-bit support
  No UTF-8 support
  No Unicode properties support
  No just-in-time compiler support
  Newline sequence is LF
  \R matches all Unicode newlines
  Internal link size = 2
  POSIX malloc threshold = 10
  Default match limit = 10000000
  Default recursion depth limit = 10000000
  Match recursion uses stack

但是当我检查创建的库(应该支持 32 位应用程序)时,我得到了 ELF 64 位。

$ file libpcre32.so.0.0.1
libpcre32.so.0.0.1: **ELF 64-bit** LSB shared object, AMD x86-64, version 1 (SYSV), not stripped

答案1

您的--enable_pcre32 configure选项指的是其本身的 32 位选项pcre(可以启用以处理 16 位或 32 位版本的正则表达式 - 大概用于 Unicode 内容?)

尝试使用您在 Apache 配置中使用的选项pcre进行构建。-m32

相关内容