解决Windows下面Apache2和Subversion1.3.x协作问题

今天在Windows下面安装Apache2.2和Subversion1.3.2,配置好httpd.conf之后发现apche的服务无法启动,说是无法加载mod_dav_svn.so。google之后发现是svn无法在apache2.2下面安装,其官方下载页面也有提示说:Note that the Apache modules included in this package was compiled against Apache HTTP Server 2.0, and thus will not work with Apache HTTP Server 2.2.不过我这个svn下载很久了,记得当时没看到这句话来着。

只好重新安装个apche2.0.58,结果仍然出错。在网上找的一些资料也不是很详细,大家都说2.0.58的apache和subversion1.3.2结合的很好。只好又下载一个subversion的windows安装包(exe文件,以前从来都是用的zip包),安装之后发现svn跟目录下面多了很多文件,其中的Win32notes.txt里面详细描述了上述问题,以及相关解决方案。

Problems with Apache and mod_dav_svn.so and mod_authz_svn.so:

    Some people are getting into trouble when starting to use
    Apache with mod_dav_svn.so and mod_authz_svn.so. Here are some possible
    solutions (you may need to try one or more of them):

    – Apache 2 outputs startup errors in the Event Viewer’s Application log,
      so check the details of the error there. The following error:
          The Apache service named reported the following error:
          >>> Cannot load <install path>/Apache2/modules/mod_dav_svn.so
          into server: The specified module could not be found.”
      means you need to copy the libdb42.dll and the intl.dll from the
      Subversion folder to your Apache\bin or Apache\modules folder
.
    – Make sure that the Subversion Path is included in the systems %PATH%
      environment.
    – Make sure that your entries in httpd.conf are correct and remember that
      mod_dav_svn.so and mod_authz_svn.so should be loaded after the other
      mod_dav*.so modules.
    – Uninstall the Apache service manually by typing:
        apache -k uninstall
      Then check your httpd.conf and reinstall the service by typing:
        apache -k install

上述红色部分就是最重要的解决内容,不光需要拷贝那两个so文件,还需要将两个dll文件拷贝到apache的bin或modules目录下面。这里还需要注意的一点是在svn1.3.2里面,两个dll文件名分别为libdb43.dllintl3_svn.dll。估计这个Win32notes也是个老版本的。

结论:一句话,搞死个人啊。看来svn开发小组测试做的也不是很齐全,这么明显的bug都能放出来。另外就是安装包里面的那几个文档在zip包里面居然没有(或者是那个win32notes文件是后来才加进去的?我下载zip包的时候还没有?),很是让我兜了不少圈子。

Leave a Reply

Your email address will not be published. Required fields are marked *