Mac command line tools 11.4 no longer has svn

MacosSvnxcode11.4

Macos Problem Overview


I just updated XCode and the command line tools to 11.4. Now when I run svn it says "svn: error: The subversion command line tools are no longer provided by Xcode". The release notes say "Command line tool support for Subversion — including svn, git-svn, and related commands is no longer provided by Xcode. If you need Subversion or related command line tools the you need to install the Command Line Tools package by running xcode-select --install." I seem to be in a loop here, as the tools are installed. Has anyone experienced this problem and resolved it?

Macos Solutions


Solution 1 - Macos

macOS Catalina

I had the same issue after upgrading to Catalina 10.15. It's clearly mentioned in the Apple website that SVN is deprecated in Xcode 11:

You can find it here: https://developer.apple.com/documentation/macos_release_notes/macos_catalina_10_15_release_notes

> Command line tool support for Subversion — including svn, git-svn, and related commands — is no longer provided by Xcode.

The solution is to install the standalone Command Line Tools package instead:

sudo rm -rf /Library/Developer/CommandLineTools

followed by:

sudo xcode-select --install

This will replace the bundled Command Line Tools with the standalone package.

If it doesn't work for you then try to install it with brew.

brew install svn

brew is a package manager for MacOS so if you don't have it installed then you can simply install it: https://brew.sh/

macOS Big Sur

I faced the same issue Today (16th November 2020) after upgrading to MacOS Big Sur. I was able to fix it by installing the SVN again using brew install svn command.

If you faced permission errors after running above command, you can fix it by running following command.

sudo chown -R $(whoami) /usr/local/*

Solution 2 - Macos

brew install svn 
        

in Xcode 11.4. Svn has been removed.

Solution 3 - Macos

I had same issue from Netbeans and have done the following from command line and now all fine

sudo xcode-select --install

Solution 4 - Macos

  1. /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  2. brew install svn

Solution 5 - Macos

Coming from a FreeBSD background we elected to install SVN via MacPorts which is akin to FreeBSD Ports. So basically one would first need to install MacPorts and then install SVN as follows:

sudo port install subversion

Some details -

  1. Install MacPorts: https://www.macports.org/install.php

  2. Install SVN: https://trac.macports.org/wiki/howto/Subversion

It took less than five(5) minutes and works well for us.

Solution 6 - Macos

I switched to SVNKIT which works very well for my purposes. Since I'm doing a lot of Java development is no drawback for me that SVNKIT is based on Java. The big advantage is that SVNKIT will still work even if Apple throws SVN out completely.

Solution 7 - Macos

I found svn still available on my Mac (upgraded from 10.15.x -> Big Sur, including XCode upgrade) in

/Library/Developer/CommandLineTools/usr/bin/svn

In the Apple Developers forum I read the suggestion to make an alias, which worked for me. However, considering svn is being dropped by Apple, this will probably not work on new installs, but it could be useful for those of us that just want it to work for now after upgrading.

alias svn=/Library/Developer/CommandLineTools/usr/bin/svn

Note: I found it easier to just make a symbolic link to svn:

ln -s /Library/Developer/CommandLineTools/usr/bin/svn /usr/local/bin/svn

Solution 8 - Macos

my mac os version is macOs Catalina 10.15.5,I try

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install
brew install svn 

but it not work.so I try to install with source code.It's work!

tar xvf subversion-1.14.0.tar.gz
cd subversion-1.14.0
./configure --with-apr=/usr/local/opt/apr --with-apr-util=/usr/local/opt/apr-util
make

now,you can find it in /usr/local/bin/

Solution 9 - Macos

Based partly on the other answers here, I built from source with this procedure:

  1. Download & unpack svn source tarball (NOT zip file!) from https://subversion.apache.org/download.cgi
  2. cd subversion-1.14.0
  3. ./get-deps (this seems to have downloaded apr and apr-util but not built them)
  4. cd apr
  5. sudo mkdir /usr/local/opt (because I did not already have such a directory on a fresh Mac)
  6. ./configure --prefix=/usr/local/opt/apr
  7. make
  8. make test (saw lots of "OK" and "SUCCESS", plus one failure in "testsock")
  9. sudo make install
  10. cd ../apr-util
  11. ./configure --prefix=/usr/local/opt/apr-util --with-apr=/usr/local/opt/apr
  12. cd ..
  13. make
  14. ./configure --with-apr=/usr/local/opt/apr --with-apr-util=/usr/local/opt/apr-util --with-lz4=internal --with-utf8proc=internal
  15. make
  16. sudo make install

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJesseView Question on Stackoverflow
Solution 1 - MacosHosseinView Answer on Stackoverflow
Solution 2 - MacosgwshView Answer on Stackoverflow
Solution 3 - MacosStuart McIntoshView Answer on Stackoverflow
Solution 4 - Macos박찬신View Answer on Stackoverflow
Solution 5 - MacosITMAGEView Answer on Stackoverflow
Solution 6 - MacosUdoView Answer on Stackoverflow
Solution 7 - MacosHanzaplastiqueView Answer on Stackoverflow
Solution 8 - MacosTomView Answer on Stackoverflow
Solution 9 - MacosJoe StroutView Answer on Stackoverflow