注意:macOS从 10.12.6 升级到 10.15.5后 svn --version 提示:
svn: error: Failed to locate ‘svn’.
svn: error: The subversion command line tools are no longer provided by Xcode.
安装了Xcode_12.4.xip
安装了
Command_Line_Tools_for_Xcode_12.4.dmg
没有效果
终极解决方案:
1.brew install svn 遇到错误看情况;
2.下载错误,就再执行一次brew install svn;
3.解压错误,就单独安装报错的那个组件;
4.最后再执行一次brew install svn;
下面是我的安装及报错过程:
1.svn -version
svn: error: Failed to locate ‘svn’.
svn: error: The subversion command line tools are no longer provided by Xcode.
2.按网上方法安装:brew install svn
Error: The following directories are not writable by your user:
/usr/local/share/man/man5
/usr/local/share/man/man7
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
And make sure that your user has write permission.
chmod u+w /usr/local/share/man/man5 /usr/local/share/man/man7
3.按提示执行:
sudo chown -R $(whoami) /usr/local/share/man/man5 /usr/local/share/man/man7
4.又报错了 brew install svn (由于网络原因,下载报错,需要再试一次)
Error: subversion: Failed to download resource “[email protected]”
Download failed: https://ghcr.io/v2/homebrew/core/openssl/1.1/blobs/sha256:eb4e1d96f1a9eac8d096220550e3ca97a46d59747ec2324e2ff74351f8319c2b
5.再执行一次 brew install svn
Error: subversion: Failed to download resource “subversion”
Download failed: https://ghcr.io/v2/homebrew/core/subversion/blobs/sha256:92ef7547ff26e327ac5bd0a544d850e4ca7872493747eecf2220ecf5be0a13bd
6.又执行一次 brew install svn (注意:openssl已经下载了,但解压的包名和下载的包名不一致,不知道什么原因,后面只能单独安装)
==> Pouring [email protected]_1.catalina.bottle.tar.gz
Error: No such file or directory @ rb_sysopen - /Users/wangyao/Library/Caches/Homebrew/downloads/34c46d9268f88a5b0e7d5e5437664512d4968c7d6a3466ccc12f8fcc955d3d81–[email protected]_1.catalina.bottle.tar.gz
7.还是不行 ,只能先单独装这个:brew install [email protected]
==> Pouring [email protected]–1.1.1l_1.catalina.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the system
keychain. To add additional certificates, place .pem files in
/usr/local/etc/[email protected]/certs
and run
/usr/local/opt/[email protected]/bin/c_rehash
[email protected] is keg-only, which means it was not symlinked into /usr/local,
because macOS provides LibreSSL.
If you need to have [email protected] first in your PATH, run:
echo ‘export PATH=“/usr/local/opt/[email protected]/bin:$PATH”’ >> ~/.zshrc
For compilers to find [email protected] you may need to set:
export LDFLAGS=“-L/usr/local/opt/[email protected]/lib”
export CPPFLAGS=“-I/usr/local/opt/[email protected]/include”
==> Summary
/usr/local/Cellar/[email protected]/1.1.1l_1: 8,073 files, 18.5MB
==> Running brew cleanup [email protected]
…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
8.还是报错:brew install svn (注:又一个依赖包解压报错)
==> Pouring utf8proc-2.6.1.catalina.bottle.tar.gz
Error: No such file or directory @ rb_sysopen - /Users/wangyao/Library/Caches/Homebrew/downloads/adaa3321388ae5971a6bc625e4958cd1ed975e56a2533cfb6ed54ee42f97cbf0–utf8proc-2.6.1.catalina.bottle.tar.gz
9.单独安装 brew install utf8proc
==> Pouring utf8proc–2.6.1.catalina.bottle.tar.gz
/usr/local/Cellar/utf8proc/2.6.1: 10 files, 752.2KB
==> Running brew cleanup utf8proc
…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
10.终于成功了 brew install svn
==> Pouring subversion–1.14.1_4.catalina.bottle.tar.gz
==> Caveats
svntools have been installed to:
/usr/local/opt/subversion/libexec
The perl bindings are located in various subdirectories of:
/usr/local/opt/subversion/lib/perl5
You may need to link the Java bindings into the Java Extensions folder:
sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib
==> Summary
/usr/local/Cellar/subversion/1.14.1_4: 241 files, 32MB
==> Running brew cleanup subversion
…
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see man brew
).
11.测试 svn --version
svn,版本 1.14.1 (r1886195)
编译于 Sep 19 2021,20:02:51 在 x86_64-apple-darwin19.6.0
Copyright © 2021 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/
可使用以下的版本库访问模块:
- ra_svn : 使用 svn 网络协议访问版本库的模块。 - 使用 Cyrus SASL 认证
- 处理“svn”方案
- ra_local : 访问本地磁盘的版本库模块。
- 处理“file”方案
- ra_serf : Module for accessing a repository via WebDAV protocol using serf.
-
using serf 1.3.9 (compiled with 1.3.9)
-
处理“http”方案
-
处理“https”方案
The following authentication credential caches are available:
- Mac OS X Keychain