1. 程式人生 > >sourcetree更新svn提示can't locate SVN/Core.pm

sourcetree更新svn提示can't locate SVN/Core.pm

裝了sourceTree一直沒有怎麼用,今天試著用用,居然報錯 can't locate SVN/Core.pm

詳細報錯如下:

Can't locate SVN/Core.pm in @INC (you may need to install theSVN::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/Editor.pmline 5.
BEGIN failed--compilation aborted at/Applications/SourceTree.app/Contents/Resources/git_local/lib/perl5/site_perl/Git/SVN/Editor.pmline 5.
Compilation failed in require at/Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svnline 81.
BEGIN failed--compilation aborted at /Applications/SourceTree.app/Contents/Resources/git_local/libexec/git-core/git-svnline 81.
Completed with errors, see above

網上找到解決辦法

 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

最後在一個國外的網友分享下找到了解決辦法

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

完美運行了