c - 安装错误apache httpd 2.4.9

标签 c linux apache redhat

我在 linux redhat 服务器上安装 Apache httpd-2.4.9,configure 命令成功执行,在执行 make 命令时它显示错误为(error: 'apr_OFN_ap_proxy_retry_worker_t' undeclared (first use in this function)).请在下面找到并帮助我解决这个问题。

$ make
...
...
apr_OFN_ap_proxy_retry_worker_t' undeclared
make[3]: Entering directory `/install/others/httpd-2.4.9/modules/ssl'
Building shared: mod_ssl.la
make[4]: Entering directory `/install/others/httpd-2.4.9/modules/ssl'
make[4]: Nothing to be done for `local-shared-build'.
make[4]: Leaving directory `/install/others/httpd-2.4.9/modules/ssl'
make[3]: Leaving directory `/install/others/httpd-2.4.9/modules/ssl'
make[3]: Entering directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
Building shared: mod_lbmethod_byrequests.la mod_lbmethod_bytraffic.la mod_lbmethod_bybusyness.la mod_lbmethod_heartbeat.la
make[4]: Entering directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
/install/others/httpd-2.4.9/srclib/apr/libtool --silent --mode=compile gcc -std=gnu99  -g -O2 -pthread      -DLINUX -D_REENTRANT -D_GNU_SOURCE     -I. -I/install/others/httpd-2.4.9/os/unix -I/install/others/httpd-2.4.9/include -I/install/others/httpd-2.4.9/srclib/apr/include -I/install/others/httpd-2.4.9/srclib/apr-util/include -I/install/others/httpd-2.4.9/srclib/apr-util/xml/expat/lib -I/install/others/apache2/include -I/install/others/httpd-2.4.9/modules/aaa -I/install/others/httpd-2.4.9/modules/cache -I/install/others/httpd-2.4.9/modules/core -I/install/others/httpd-2.4.9/modules/database -I/install/others/httpd-2.4.9/modules/filters -I/install/others/httpd-2.4.9/modules/ldap -I/install/others/httpd-2.4.9/modules/loggers -I/install/others/httpd-2.4.9/modules/lua -I/install/others/httpd-2.4.9/modules/proxy -I/install/others/httpd-2.4.9/modules/session -I/install/others/httpd-2.4.9/modules/ssl -I/install/others/httpd-2.4.9/modules/test -I/install/others/httpd-2.4.9/server -I/install/others/httpd-2.4.9/modules/arch/unix -I/install/others/httpd-2.4.9/modules/dav/main -I/install/others/httpd-2.4.9/modules/generators -I/install/others/httpd-2.4.9/modules/mappers -prefer-pic -c mod_lbmethod_byrequests.c && touch mod_lbmethod_byrequests.slo
mod_lbmethod_byrequests.c: In function 'find_best_byrequests':
<b>mod_lbmethod_byrequests.c:88: error: 'apr_OFN_ap_proxy_retry_worker_t' undeclared (first use in this function)
mod_lbmethod_byrequests.c:88: error: (Each undeclared identifier is reported only once
mod_lbmethod_byrequests.c:88: error: for each function it appears in.)
mod_lbmethod_byrequests.c:88: error: expected expression before ')' token
mod_lbmethod_byrequests.c:95: warning: implicit declaration of function 'APLOGNO'
mod_lbmethod_byrequests.c:96: error: expected ')' before string constant
mod_lbmethod_byrequests.c:97: warning: passing argument 6 of 'ap_log_error' makes pointer from integer without a cast
mod_lbmethod_byrequests.c:112: warning: implicit declaration of function 'PROXY_WORKER_IS_DRAINING'
mod_lbmethod_byrequests.c:142:69: error: invalid digit "8" in octal constant
mod_lbmethod_byrequests.c:143: error: expected ')' before string constant
mod_lbmethod_byrequests.c:144: warning: passing argument 6 of 'ap_log_error' makes pointer from integer without a cast
mod_lbmethod_byrequests.c: At top level:
mod_lbmethod_byrequests.c:177: warning: excess elements in struct initializer
mod_lbmethod_byrequests.c:177: warning: (near initialization for 'byrequests')
mod_lbmethod_byrequests.c:179: warning: excess elements in struct initializer
mod_lbmethod_byrequests.c:179: warning: (near initialization for 'byrequests')
mod_lbmethod_byrequests.c:190: warning: data definition has no type or storage class
mod_lbmethod_byrequests.c:190: warning: type defaults to 'int' in declaration of 'AP_DECLARE_MODULE'
mod_lbmethod_byrequests.c:190: warning: parameter names (without types) in function declaration
mod_lbmethod_byrequests.c:190: error: function 'AP_DECLARE_MODULE' is initialized like a variable
mod_lbmethod_byrequests.c:191: error: invalid initializer
mod_lbmethod_byrequests.c:191: error: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:191: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:191: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:192: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:192: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:193: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:193: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:194: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:194: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:195: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:195: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:196: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:196: warning: (near initialization for 'AP_DECLARE_MODULE')
mod_lbmethod_byrequests.c:198: warning: excess elements in scalar initializer
mod_lbmethod_byrequests.c:198: warning: (near initialization for 'AP_DECLARE_MODULE')
make[4]: *** [mod_lbmethod_byrequests.slo] Error 1</b>
make[4]: Leaving directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
make[3]: *** [shared-build-recursive] Error 1
make[3]: Leaving directory `/install/others/httpd-2.4.9/modules/proxy/balancers'
make[2]: *** [shared-build-recursive] Error 1
make[2]: Leaving directory `/install/others/httpd-2.4.9/modules'
make[1]: *** [shared-build-recursive] Error 1
make[1]: Leaving directory `/install/others/httpd-2.4.9'
make: *** [all-recursive] Error 1

谢谢,
Shanmugam A.

最佳答案

编译错误:

error: 'apr_OFN_ap_proxy_retry_worker_t' undeclared (first use in this function)

在编译“mod_lbmethod_byrequests.c”时,更具体地说,在编译函数“find_best_byrequests()”时(在“mod_lbmethod_byrequests.c”的第 88 行);编译器遇到了一个未正确定义的符号“apr_OFN_ap_proxy_retry_worker_t”。

通常通过包含为编译器定义未知符号 ('apr_OFN_ap_proxy_retry_worker_t') 的 .h 文件来克服此类错误。

关于c - 安装错误apache httpd 2.4.9,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23348859/

相关文章:

使用 vim 读取带有新行的 Linux cat 命令输出

windows - 如何在不使用任何可移动磁盘的情况下将文件从主机操作系统传输到虚拟机中运行的操作系统?

php - svn export 使我的页面空白

javascript - minikube 集群上的 Vanilla JS ERR_NAME_NOT_RESOLVED

python - Django 不提供管理静态文件(Apache、mod_wsgi)

C++ 自定义异常 : run time performance and passing exceptions from C++ to C (as error info)

c - 填充 skb 中的 header 字段

linux - 错误捕获 scp 退出代码不起作用

c++ - 如何制作可移植 isnan/isinf 函数

对 gcc -static 选项或其在虚拟机中的行为感到困惑