mod_fastcgi 安装错误

mod_fastcgi 安装错误

我已经成功编译了 Apache 2.4.2,但是在尝试编译 mod_fastcgi 模块时遇到错误。

有小费吗?

root@local:/usr/src/libapache-mod-fastcgi# /usr/local/apache2/bin/apxs -o mod_fastcgi.so -c *.c
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/usr/local/apache2/include  -I/usr/local/apr/include/apr-1   -I/usr/local/apr/include/apr-1   -c -o fcgi_buf.lo fcgi_buf.c && touch fcgi_buf.slo
/usr/local/apr/build-1/libtool --silent --mode=compile gcc -std=gnu99 -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -D_LARGEFILE64_SOURCE -g -O2 -pthread -I/usr/local/apache2/include  -I/usr/local/apr/include/apr-1   -I/usr/local/apr/include/apr-1   -c -o fcgi_config.lo fcgi_config.c && touch fcgi_config.slo
fcgi_config.c: In function 'fcgi_config_set_fcgi_uid_n_gid':
fcgi_config.c:241: error: 'unixd_config' undeclared (first use in this function)
fcgi_config.c:241: error: (Each undeclared identifier is reported only once
fcgi_config.c:241: error: for each function it appears in.)
fcgi_config.c: In function 'fcgi_config_make_dir':
fcgi_config.c:345: error: 'unixd_config' undeclared (first use in this function)
fcgi_config.c: In function 'fcgi_config_new_static_server':
fcgi_config.c:782: warning: initialization from incompatible pointer type
fcgi_config.c:782: error: expected expression before ')' token
fcgi_config.c:782: warning: passing argument 5 of 'ap_log_error_' makes integer from pointer without a cast
/usr/local/apache2/include/http_log.h:372: note: expected 'apr_status_t' but argument is of type 'struct server_rec *'
fcgi_config.c: In function 'fcgi_config_new_external_server':
fcgi_config.c:975: warning: initialization from incompatible pointer type
fcgi_config.c:975: error: expected expression before ')' token
fcgi_config.c:975: warning: passing argument 5 of 'ap_log_error_' makes integer from pointer without a cast
/usr/local/apache2/include/http_log.h:372: note: expected 'apr_status_t' but argument is of type 'struct server_rec *'
apxs:Error: Command failed with rc=65536
.
root@local:/usr/src/libapache-mod-fastcgi#

答案1

我记得 mod_fastcgi 和 Apache 2.4 存在某种错误。刚刚检查了 2.2 版本,编译完美。现在找不到错误报告。

答案2

几乎可以肯定这是由于 Apache 改变​​了unixd_configapi 名称ap_unixd_配置在 v2.4.x 中

http://httpd.apache.org/docs/2.4/developer/new_api_2_4.html

我一直在努力尝试让 2.4 与 mod_fastcgi 一起工作,我甚至尝试编辑 fcgi.h(我在 mod_fastcgi 源文件中找到的唯一对 unixd_config 的引用)以添加

#define unixd_config ap_unixd_config

或者以其他方式重命名对 unixd_config 的所有引用,但是这些都不起作用。

我开始怀疑 apr / apr-devel 包中是否也可能有一些对 unixd_config 的引用,因为它们是编译 mod_fastcgi 所必需的,并且我必须找到一个较新的版本(我相信是 1.4.6,因为 yum 安装了旧的 1.3.9),并将它们放入 apache 2.4.3 源的 srclib 文件夹中,以便它能够编译而不会出现错误(如下所示:http://www.thegeekstuff.com/2012/05/install-apache-2-on-centos-6/

这真的很令人沮丧,因为我想要 apache 2.4,但不想将 php 作为 mod_php 运行,但使用 mod_proxy_fcgi 和 php fpm 的“新与改进”方法存在各种问题,例如不想与别名很好地配合使用 :(

答案3

你试过了吗此补丁mod_fastcgi

答案4

您没有安装所有依赖项。

相关内容