刚开始用mac,啥都不知道,原来它自带了git,svn;但是我用sourcetree,还有apicloud studio2都会报错,

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 
/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/Edito
r.pm line 5.

BEGIN failed--compilation aborted at 

/Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Editor.pm line 5.
Compilation failed in require at 
/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svn line 81.
BEGIN failed--compilation aborted at 
/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svn line 81.
Completed with errors, see above

缺少文件,昨天用mysql,也是总报错2059缺少文件,头秃呀。。。

最后,找到了一个成功解决SVN错误的方法:

sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/SVN/ /Library/Perl/5.18/SVN

sudo mkdir /Library/Perl/5.18/auto

sudo ln -s /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN/ /Library/Perl/5.18/auto/SVN

好了,没有报错了,开心!然后,去看了一下,这命令啥意思。这个命令在linux中很重要。它的功能是为某一个文件或目录在另外一个位置建立一个同步的链接,类似Windows下的超级链接。