AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1299877
Accepted
Richard Chambers
Richard Chambers
Asked: 2020-12-14 12:44:39 +0800 CST2020-12-14 12:44:39 +0800 CST 2020-12-14 12:44:39 +0800 CST

重新安装后使用 Subversion 服务器启动 Apache Web 服务器时出现“未知 DAV 提供程序:svn”

  • 772

我有一台 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.

当我尝试执行reinstallSubversion 时,我看到一个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
apt apache2 webdav svn 20.04
  • 1 1 个回答
  • 1259 Views

1 个回答

  • Voted
  1. Best Answer
    Richard Chambers
    2020-12-15T08:58:18+08:002020-12-15T08:58:18+08:00

    作为调查设置通过 Apache Web 服务器访问的 Subversion 存储库的一部分,我想删除 Subversion 和 Apache2,然后重新安装。

    在第二次进行安装时,似乎安装导致一些文件和组件丢失,特别是/etc/apache2/文件和目录,例如mods-enabled. 几个dav文件(dav_fs.conf、dav_fs.load、dav.load、dav_svn.conf和dav_svn.load)也丢失了。但是,在apt使用该选项重做命令后reinstall,文件被重新创建。in但没有为文件创建mods-available符号链接。mods-enableddav

    systemctl status apache2.service通过查看命令状态、查看 Apache2 服务器登录/var/log/apache2并在 Internet 上搜索错误消息,我能够更正 Apache2 服务器启动错误。

    出现此错误,几篇文章提到将指令添加LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so到文件httpd2.conf中,但是在我的 Apache 服务器中,有一个文件/etc/apache2/apache2.conf似乎是配置参数的起点,并且在处理此文件期间,根据这些注释,位于子目录中的其他文件来自/etc/apache2/apache2.conf:

    # * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
    #   directories contain particular configuration snippets which manage modules,
    #   global configuration fragments, or virtual host configurations,
    #   respectively.
    

    附加配置文件加载IncludeOptional了apache2.conf.

    根据@user535733 的建议,他指向Unix & Linux StackExchange: Unknown DAV provider: svn,我决定通过使用以下内容重新创建文件来尝试该LoadModule指令/etc/apache2/mods-available/dav_svn.load:

    # Depends: dav
    LoadModule dav_svn_module     /usr/lib/apache2/modules/mod_dav_svn.so
    

    然后做符号链接到目录/etc/apache2/mods-enabled/。

    一旦我还为其他 DAV 相关文件(、、和)创建了符号链接,这dav_fs.conf就会dav_fs.load起作用dav.load。

    sudo apt 升级错误

    我以为我已经解决了所有问题,但是几天后我尝试在运行sudo apt upgrade后运行sudo apt update并显示以下错误:

    rick@rick-MS-7B98:/etc/apache2/mods-enabled$ sudo apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    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
    Errors were encountered while processing:
     libapache2-mod-svn
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    在最终能够这样做之前,我尝试了几件事来清除此错误。

    我试过sudo apt reinstall libapache2-mod-svn这给了我一个类似的错误。

    我尝试sudo apt remove libapache2-mod-svn了哪个有效,我能够做到sudo apt upgrade没有错误,但是模块现在已被删除。

    我试过sudo apt-get install libapache2-mod-svn这给了我一个类似的错误。

    然后,我尝试了有关此类错误的文章中建议的几个命令:sudo dpkg --configure -a并sudo apt-get install -f出现以下错误:

    rick@rick-MS-7B98:~$ sudo dpkg --configure -a
    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
    Errors were encountered while processing:
     libapache2-mod-svn
    rick@rick-MS-7B98:~$ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 0 B of additional disk space will be used.
    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
    Errors were encountered while processing:
     libapache2-mod-svn
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    我尝试通过使用 then 和 then 来纠正这些错误,sudo apt remove libapache2-mod-svn但它sudo apt update失败并显示类似的错误消息。sudo apt upgradesudo apt install libapache2-mod-svn

    最后,我使用了一系列命令来删除(sudo apt remove libapache2-mod-svn)、清除(sudo apt purge libapache2-mod-svn),然后安装(sudo apt-get install libapache2-mod-svn),这似乎工作正常,没有错误。然后我不得不/etc/apache2/mods-enabled/dav_svn.conf再次修改该文件,并且能够通过http://192.168.0.4/svn.

    rick@rick-MS-7B98:/etc/apache2/mods-enabled$ sudo apt remove libapache2-mod-svn
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      libapache2-mod-svn
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    1 not fully installed or removed.
    After this operation, 452 kB disk space will be freed.
    Do you want to continue? [Y/n] y
    (Reading database ... 196824 files and directories currently installed.)
    Removing libapache2-mod-svn (1.13.0-3) ...
    apache2_invoke authz_svn prerm: No action required
    apache2_invoke dav_svn prerm: No action required
    rick@rick-MS-7B98:/etc/apache2/mods-enabled$ sudo apt purge libapache2-mod-svn
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    The following packages will be REMOVED:
      libapache2-mod-svn*
    0 upgraded, 0 newly installed, 1 to remove and 0 not upgraded.
    After this operation, 0 B of additional disk space will be used.
    Do you want to continue? [Y/n] y
    (Reading database ... 196812 files and directories currently installed.)
    Purging configuration files for libapache2-mod-svn (1.13.0-3) ...
    apache2_invoke authz_svn postrm: No action required
    apache2_invoke postrm: Purging state for dav_svn
    rick@rick-MS-7B98:/etc/apache2/mods-enabled$ sudo apt-get install libapache2-mod-svn
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Suggested packages:
      db5.3-util
    The following NEW packages will be installed:
      libapache2-mod-svn
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 0 B/87.7 kB of archives.
    After this operation, 452 kB of additional disk space will be used.
    Selecting previously unselected package libapache2-mod-svn.
    (Reading database ... 196809 files and directories currently installed.)
    Preparing to unpack .../libapache2-mod-svn_1.13.0-3_amd64.deb ...
    Unpacking libapache2-mod-svn (1.13.0-3) ...
    Setting up libapache2-mod-svn (1.13.0-3) ...
    apache2_invoke: Enable module authz_svn
    apache2_invoke dav_svn: already enabled
    rick@rick-MS-7B98:/etc/apache2/mods-enabled$ sudo apt upgrade
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Calculating upgrade... Done
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
    
    • 0

相关问题

  • 如何编写 shell 脚本来安装应用程序列表?

  • 如何查看存档中可用的软件包的所有版本?

  • 是否可以说出我安装的哪些软件包不在原版安装中?

  • 如何删除 PPA?

  • 使用 apt-get upgrade 时如何强制安装内核更新?

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve