Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Background: I am a longtime Gentoo user, and this is my first time using Ubuntu (installed on a VM to avoid compiling everything from scratch). I am familiar with a Linux environment but somewhat unfamiliar with Ubuntu.

I am trying to install Subversion 1.7 on Ubuntu and saw this post: Where can I find a Subversion 1.7 binary?

The above post recommends using the PPA ppa:dominik-stadler/subversion-1.7. I also found the PPA ppa:svn/ppa from another link. They both cause problems for me.

The issue is that any svn operation using the remote server causes the following error:

svn: E170001: Unable to connect to a repository at URL 'svn+ssh://my_repo'
svn: E170001: Could not create SASL context: generic failure: No such file or directory

This seems to arise from a recent bug involving SVN dependency on the libsasl library, as documented by Debian users here:

and also Mac users here:

Resolution seems to involve either updating the cyrus-sasl or libsasl library to a newer version (neither of which is in the latest apt packages), or compiling subversion without SASL support. As a Gentoo user I started looking into how to compile svn from source, but it looks way more complicated on Ubuntu than I'm used to and I'm not sure what the canonical way is. My questions:

  • Is there an obvious fix for this problem that I am overlooking?
  • Is there a way to update the dependencies for SVN to something that works through using synaptic or apt-get?
  • If I want to compile from scratch, how do I use the sources in the PPA instead of downloading my own source copy (i.e. the PPA has both binary and sources?)

EDIT: This seems to be caused by this bug in SASL

I changed /etc/hostname without updating /etc/hosts, and this caused the error. Fixing /etc/hosts allowed me to get around the error for now without having to compile SVN from scratch or finding a patched version of cyrus-sasl2.

share|improve this question
up vote 1 down vote accepted

This is a bug. One would hope any "obvious fix" would be added to the PPA immediately. One workaround I have seen (from one of your links) is to just configure it with the --without-sasl flag but you'll need to mess around with the build scripts for that.

Here's the standard way of building the package from repo sources. If your PPA has source, it will use that source. You'll know fairly quickly if it worked because the directory will be subversion-1.7...

This also gets the dependencies (through build-dep).

sudo apt-get build-dep subversion
apt-get source subversion
cd subversion*
dpkg-buildpackage -us -uc -nc
dpkg -i ../subversion*.deb

Edit: Just got to the end of your macports link. Looks like there's a fix in libsasl. Find a separate PPA for that, or build that and you might be okay.

share|improve this answer
Thanks for your help. I found that my hostname was messed up after changing it incorrectly and found another workaround after discovering I have updated my question. – Andrew Mao Sep 4 '12 at 19:35

As mentioned this happened after renaming the hostname (cloned vm). Solution on Ubuntu/Debian with subversion 1.7.7-1 - Execute following:

dpkg-reconfigure libsasl2-2
dpkg-reconfigure libsasl2-modules
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.