3

I have a Ubuntu 20.04 PC that I am setting up as a Subversion server with Apache 2.4 web server to allow me to use the Ankh client plug-in with Visual Studio on a Windows 10 PC.

How do I fix the Unknown DAV provider: svn error reported by the Apache2 web server when I do a restart? I think it may be connected to an error I see, dpkg: error processing package libapache2-mod-svn, when doing a sudo apt reinstall subversion.

I originally had both Apache and Subversion installed and after making configuration file changes, it was working fine.

I then uninstalled and cleaned up both in order to redo the installation, documenting my procedure. I'm a bit hazy on the details however the basics were to:

  • use sudo apt remove apache2 and sudo apt remove subversion
  • remove some remaining directories such as /etc/apache2

The reinstall has not gone well. For some reason installation seems to have been partial as if the apt install command was finding components and assuming other components also already existed when they did not. In some cases using apt reinstall has fixed issues and in other cases I built configuration files by hand.

I am now at the point where Apache web server is working and serving pages. Subversion is also working from the command line in Ubuntu.

I am now having a problem with the DAV component of Apache for the Subversion interface not working.

I am seeing an error when I attempt to enable the several dav related modules.

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.

When I attempt to do a reinstall of Subversion, I see a 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)

And when I check the status of 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)

When I check to find out what uses libapache2-mod-svn, I get the following.

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
  • 1
    The Apache error message told you that you have a "Syntax error on line 16 of /etc/apache2/mods-enabled/dav_svn.conf", specifically "Unknown DAV provider: svn." See https://unix.stackexchange.com/a/152437 for one possible solution. – user535733 Dec 13 '20 at 22:33
  • @user535733 thank you for the comment. I think this is one of the articles and postings that I found while trying to research this problem however I wasn't sure as to whether it would apply. This post and others mention the LoadModule dav_svn_module modules/mod_dav_svn.so directive but I'm not sure where to put it. I have an httpd.conf file in /etc/apache2/mods-available but not linked to into mods-enabled. Perhaps I should add this to mods-enabled/dav_svn.load? – Richard Chambers Dec 13 '20 at 23:11
  • @user535733 Well how about that, I added the directive LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so to the file /etc/apache2/mods-enabled/dav_svn.load and when I restart Apache, I don't see an error. I can now use the browser to look at my Subversion repository. If I do an edit to comment out the directive and restart Apache, I see the error. If you want to post an answer along these lines, I'd be happy to accept it. – Richard Chambers Dec 13 '20 at 23:20
  • @user535733 by the way, any ideas as to the dpkg: error processing package labapache2-mod-svn error when doing the reinstall of Subversion? – Richard Chambers Dec 13 '20 at 23:23

1 Answers1

0

As part of investigating setting up a Subversion repository with access via the Apache web server, I wanted to remove both Subversion and Apache2 then do the installation all over again.

When doing the installation a second time, it appears that the install resulted in some missing files and components, in particular /etc/apache2/ files and directories such as mods-enabled. The several dav files (dav_fs.conf, dav_fs.load, dav.load, dav_svn.conf, and dav_svn.load) were also missing. However after redoing the apt command with the reinstall option, the files were recreated. in mods-available but the symbolic links in mods-enabled were not created for the dav files.

I was able to correct Apache2 server start up errors by looking at the status with the command systemctl status apache2.service and by looking at the Apache2 server logs in /var/log/apache2 and searching the internet for the error messages.

With this error, several articles mentioned adding the directive LoadModule dav_svn_module /usr/lib/apache2/modules/mod_dav_svn.so to the file httpd2.conf however in my Apache server there is a file /etc/apache2/apache2.conf which appears to be the starting point for configuration parameters and during processing of this file, other files located in sub-directories per these comments from /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.

The additional configuration files are loaded with IncludeOptional directives in apache2.conf.

Based on the suggestion of @user535733, who pointed to Unix & Linux StackExchange: Unknown DAV provider: svn, I decided to try the LoadModule directive by recreating the file /etc/apache2/mods-available/dav_svn.load with the following:

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

then doing the symbolic link into the directory /etc/apache2/mods-enabled/.

This worked once I also created the symbolic links for the other DAV related files (dav_fs.conf, dav_fs.load, and dav.load).

sudo apt upgrade errors

I thought that I had everything fixed however a few days later I tried to run sudo apt upgrade after running sudo apt update and the following errors were displayed:

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)

I tried a couple of things to clear this error before finally able to do so.

I tried sudo apt reinstall libapache2-mod-svn which gave me a similar error.

I tried sudo apt remove libapache2-mod-svn which worked and I was able to do the sudo apt upgrade without an error however the module was now removed.

I tried sudo apt-get install libapache2-mod-svn which gave me a similar error.

I then tried several commands suggested in an article about this type of error: sudo dpkg --configure -a and sudo apt-get install -f with the following errors:

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)

I tried to correct these errors by using the sudo apt remove libapache2-mod-svn then doing sudo apt update then sudo apt upgrade and then sudo apt install libapache2-mod-svn and it failed with similar error messages.

Finally I used a series of commands to remove (sudo apt remove libapache2-mod-svn), purge (sudo apt purge libapache2-mod-svn), and then install (sudo apt-get install libapache2-mod-svn) and that seemed to work fine with no errors. I then had to modify the /etc/apache2/mods-enabled/dav_svn.conf file again and I was able to access my Subversion repository through 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.
  • This posting has a similar problem and answers posted in response mention doing the purge however there are other suggestions as well that may be effective in resolving this issue https://askubuntu.com/questions/448961/subprocess-installed-post-installation-script-returned-error-exit-status-247-for – Richard Chambers Dec 28 '20 at 20:12