Could not initilize the SASL library


Following the tutorial here, I installed Subversion 1.5.6 (Setup-Subversion-1.5.6.msi here) on Windows Server 2003 SP2. I was able to create a repository (C:\SVN\Repository) using the command line, no problem. And I can configure it as a service, but when I try to start the service, it won't start. I figured I would try to run svnserve manually without the –service argument, but it errors. I am trying:

svnserve -r c:\svn\repository

…and the error I get is:

svn: Could not initialize the SASL library
svn: generic failure

Other Information that might be pertinent:
I edited the svnserve.conf file by uncommenting the anon-access and auth-access lines:

anon-access = none
auth-access = write

I also uncommented the password-db line:

password-db = passwd

I am logged into the box using remote desktop, and I am logged in as an administrator on the server. Any ideas?

Best Solution

1) The SASL / svnserve configuration is not always an easy step, and is described in details here. Here is a summary:

  • Don't forget to check the following registry key which must point to your configuration file:

    [HKEY_LOCAL_MACHINE\SOFTWARE\Carnegie Mellon\Project Cyrus\SASL Library]

  • The directory C:\svn\etc\conf should contain the svn.conf file (or subversion.conf should work too), that contains for example:

    pwcheck_method: auxprop
    auxprop_plugin: sasldb
    sasldb_path: c:\svn\etc\conf\saslpasswd
    mech_list: ANONYMOUS DIGEST-MD5

  • Finally, the saslpasswd password file will have to be created for the same domain as declared in your repository, corresponding to the <domain> below. Check the saslpasswd2.exe command usage for that part.

  • In each repository, in the conf subdirectory, the svnserve.conf file needs the following lines (replace <domain>):

    authz-db = //./C:/svn/etc/conf/authz
    realm = <domain>
    use-sasl = true

2) I had some problems with SASL in the past around version 1.5, with executables from tigris compiled against Apache. It was solved by installing the Collabnet version instead.

See this link: and for older versions: but unless you have a very good reason not to, I would install the latest version. The installer will let you choose whether you want to have an Apache or svnserve server.

Related Question