直接使用sourcetree clone svn的代码,会报错。
报错代码如下:
Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /usr/local/git/lib/perl5/site_perl /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/5.18.2 /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl /Library/Perl/5.18/darwin-thread-multi-2level /Library/Perl/5.18 /Network/Library/Perl/5.18/darwin-thread-multi-2level /Network/Library/Perl/5.18 /Library/Perl/Updates/5.18.2 /System/Library/Perl/5.18/darwin-thread-multi-2level /System/Library/Perl/5.18 /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level /System/Library/Perl/Extras/5.18 .) at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Utils.pm line 6.
Compilation failed in require at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN.pm line 26.
BEGIN failed--compilation aborted at /Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN.pm line 33.
Compilation failed in require at /Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svn line 25.
解决办法
下载xcode
之后 在命令提示行 输入
xcode-select --install
选择安装 等5-6分钟就好了
这时候
sourcetree
还是不行 需要继续在命令提示行 输入sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/SVN /System/Library/Perl/Extras/5.18/SVN
sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN//System/Library/Perl/Extras/5.18/auto/SVN
报错以及解决办法
报错提示
ln: /System/Library/Perl/Extras/5.18/SVN: Operation not permitted
解决办法
El Capitan
加入了Rootless
机制,不再能够随心所欲的读写很多路径下了。设置root
权限也不行。Rootless
机制将成为对抗恶意程序的最后防线于是尝试关闭
Rootless
。重启按住 Command+R
,进入恢复模式,打开Terminal
。csrutil disable
重启即可。如果要恢复默认,那么
csrutil enable
评论
发表评论