• 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;
  • 相关阅读:
    php yield学习笔记(一)
    EasySwoole的ContextManager的分析和使用
    Easyswoole的WaitGroup和Csp组件的分析和使用
    Laravel Event的分析和使用
    Laravel驱动管理类Manager的分析和使用
    Laravel Exception结合自定义Log服务的使用
    vue基础
    vue.js
    改善项目组织
    MongoDB 4.0版
  • 原文地址:https://www.cnblogs.com/huqingyu/p/679265.html
Copyright © 2020-2023  润新知