我有一台 Ubuntu 20.04 PC,我将其设置为带有 Apache 2.4 Web 服务器的 Subversion 服务器,以允许我在 Windows 10 PC 上将 Ankh 客户端插件与 Visual Studio 一起使用。
如何修复Unknown DAV provider: svn
重启时 Apache2 Web 服务器报告的错误?我认为这可能与我dpkg: error processing package libapache2-mod-svn
在执行sudo apt reinstall subversion
.
我最初安装了 Apache 和 Subversion,在更改配置文件后,它工作正常。
然后我卸载并清理了两者以重做安装,记录我的过程。我对细节有点模糊,但基础是:
- 使用
sudo apt remove apache2
和sudo apt remove subversion
- 删除一些剩余的目录,例如
/etc/apache2
重新安装并不顺利。由于某种原因,安装似乎是部分的,就好像该apt install
命令正在查找组件并假设其他组件也已经存在,但实际上它们不存在。在某些情况下,使用apt reinstall
已经解决了问题,而在其他情况下,我手动构建了配置文件。
我现在正处于 Apache Web 服务器正在工作和提供页面的地步。Subversion 也在 Ubuntu 的命令行中工作。
我现在遇到了 Apache 的 DAV 组件的问题,因为 Subversion 接口无法正常工作。
当我尝试启用几个dav
相关模块时,我看到一个错误。
rick@rick-MS-7B98:/etc/apache2$ sudo a2enmod dav dav_fs dav_svn
Enabling module dav.
Considering dependency dav for dav_fs:
Module dav already enabled
Enabling module dav_fs.
Considering dependency dav for dav_svn:
Module dav already enabled
Enabling module dav_svn.
To activate the new configuration, you need to run:
systemctl restart apache2
rick@rick-MS-7B98:/etc/apache2$ sudo systemctl restart apache2
Job for apache2.service failed because the control process exited with error code.
See "systemctl status apache2.service" and "journalctl -xe" for details.
rick@rick-MS-7B98:/etc/apache2$ systemctl status apache2.service
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2020-12-13 15:21:50 EST; 13s ago
Docs: https://httpd.apache.org/docs/2.4/
Process: 74845 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)
Dec 13 15:21:50 rick-MS-7B98 systemd[1]: Starting The Apache HTTP Server...
Dec 13 15:21:50 rick-MS-7B98 apachectl[74858]: [Sun Dec 13 15:21:50.461280 2020] [so:warn] [pid 74858] AH01574: module dav_fs_module is already loaded, skipping
Dec 13 15:21:50 rick-MS-7B98 apachectl[74858]: AH00526: Syntax error on line 16 of /etc/apache2/mods-enabled/dav_svn.conf:
Dec 13 15:21:50 rick-MS-7B98 apachectl[74858]: Unknown DAV provider: svn
Dec 13 15:21:50 rick-MS-7B98 apachectl[74845]: Action 'start' failed.
Dec 13 15:21:50 rick-MS-7B98 apachectl[74845]: The Apache error log may have more information.
Dec 13 15:21:50 rick-MS-7B98 systemd[1]: apache2.service: Control process exited, code=exited, status=1/FAILURE
Dec 13 15:21:50 rick-MS-7B98 systemd[1]: apache2.service: Failed with result 'exit-code'.
Dec 13 15:21:50 rick-MS-7B98 systemd[1]: Failed to start The Apache HTTP Server.
当我尝试执行reinstall
Subversion 时,我看到一个dpkg: error processing package labapache2-mod-svn
rick@rick-MS-7B98:~$ sudo ap reinstall subversion
sudo: ap: command not found
rick@rick-MS-7B98:~$ sudo apt reinstall subversion
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
Need to get 0 B/824 kB of archives.
After this operation, 0 B of additional disk space will be used.
(Reading database ... 196796 files and directories currently installed.)
Preparing to unpack .../subversion_1.13.0-3_amd64.deb ...
Unpacking subversion (1.13.0-3) over (1.13.0-3) ...
Setting up libapache2-mod-svn (1.13.0-3) ...
dpkg: error processing package libapache2-mod-svn (--configure):
installed libapache2-mod-svn package post-installation script subprocess returned error exit status 1
Setting up subversion (1.13.0-3) ...
Processing triggers for man-db (2.9.1-1) ...
Errors were encountered while processing:
libapache2-mod-svn
E: Sub-process /usr/bin/dpkg returned an error code (1)
当我检查 Subversion 的状态时:
rick@rick-MS-7B98:~$ svn --version
svn, version 1.13.0 (r1867053)
compiled Mar 24 2020, 12:33:36 on x86_64-pc-linux-gnu
Copyright (C) 2019 The Apache Software Foundation.
This software consists of contributions made by many people;
see the NOTICE file for more information.
Subversion is open source software, see http://subversion.apache.org/
The following repository access (RA) modules are available:
* ra_svn : Module for accessing a repository using the svn network protocol.
- with Cyrus SASL authentication
- handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
- handles 'file' scheme
* ra_serf : Module for accessing a repository via WebDAV protocol using serf.
- using serf 1.3.9 (compiled with 1.3.9)
- handles 'http' scheme
- handles 'https' scheme
The following authentication credential caches are available:
* Gnome Keyring
* GPG-Agent
* KWallet (KDE)
当我检查以找出用途libapache2-mod-svn
时,我得到以下信息。
rick@rick-MS-7B98:~$ dpkg -S libapache2-mod-svn
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/examples/svnindex.css
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/INSTALL.authz.gz
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/README.Debian
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/changelog.Debian.gz
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/examples/svnindex.xsl
libapache2-mod-svn: /usr/share/lintian/overrides/libapache2-mod-svn
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/copyright
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/examples
libapache2-mod-svn: /usr/share/doc/libapache2-mod-svn/NEWS.Debian.gz