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\reposit开发者_JAVA百科ory
...and the error I get is:
svn: Could not initialize the SASL library
svn: generic failureOther 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 = writeI 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?
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]
"ConfFile"="c:\\svn\\etc\\conf"
The directory C:\svn\etc\conf should contain the
svn.conf
file (orsubversion.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 thesaslpasswd2.exe
command usage for that part.In each repository, in the conf subdirectory, the
svnserve.conf
file needs the following lines (replace<domain>
):[general]
authz-db = //./C:/svn/etc/conf/authz
realm = <domain>
[sasl]
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: http://www.open.collab.net/downloads/subversion/ and for older versions: http://www.open.collab.net/downloads/subversion/svn1.5.html 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.
The tutorial you referenced was for a much older version of Subversion, and may be missing steps. Nowadays, the fastest way to set up a Subversion server on Windows is to use VisualSVN Server, whose Standard version is free (as in beer) to use.
精彩评论