apache22与mod_mono

apache22与mod_mono

今天在第一次编译mod_mono的时候,使用的是apache 2.2,./configure后出现了如下的提示

Configuration summary for mod_mono

   * Installation prefix = /usr/local
   * Apache version = 1.3
   * Apache modules directory = /opt/discuz/apache/modules
   * apxs = /opt/discuz/apache/bin/apxs
   * Verbose logging (debug) = no
   * mono prefix = /usr/lib/pkgconfig/../..
   * Default MonoApplicationsConfigDir = /opt/discuz/apache/conf/mod-mono-applications

明明apache的版本是2.2,怎么提示是1.3呢,看了configure.in发现判断apache版本的代码真是多呀,直接看config.log,发现了这一段

configure:21340: gcc -c -g -O2 -I/opt/discuz/apache/include  conftest.c >&5
In file included from /opt/discuz/apache/include/apr_general.h:28,
                 from /opt/discuz/apache/include/ap_release.h:24,
                 from conftest.c:51:
/opt/discuz/apache/include/apr.h:270: error: syntax error before "apr_off_t"
/opt/discuz/apache/include/apr.h:270: warning: data definition has no type or storage class

*****中间省略了一部分**

|       #include
|
| int
| main ()
| {
|
|       char *version = AP_SERVER_BASEREVISION;
|
|   ;
|   return 0;
| }
configure:21396: gcc -c -g -O2 -I/opt/discuz/apache/include  conftest.c >&5
In file included from /opt/discuz/apache/include/ap_config.h:25,
                 from /opt/discuz/apache/include/httpd.h:43,
                 from conftest.c:51:
/opt/discuz/apache/include/apr.h:270: error: syntax error before "apr_off_t"
/opt/discuz/apache/include/apr.h:270: warning: data definition has no type or storage class

apr.h的270行内容是

typedef  off64_t           apr_off_t;

将其更改为

typedef  long long apr_off_t;

然后重新configure,得到了如下的结果,并且ASP.NET程序也运行正常了。

   * Installation prefix = /usr/local
   * Apache version = 2.2
   * Apache modules directory = /opt/discuz/apache/modules
   * apxs = /opt/discuz/apache/bin/apxs
   * apr-config = /opt/discuz/apache/bin/apr-1-config
   * Verbose logging (debug) = no
   * mono prefix = /usr/lib/pkgconfig/../..
   * Default MonoApplicationsConfigDir = /opt/discuz/apache/conf/mod-mono-applications

我使用的机器是32bit的,如果是64bit,那么应该改成

typedef  long apr_off_t;
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值