On OSX using sourcetree / git-svn getting “Can't locate SVN/Core.pm in @INC ”

前端 未结 10 2318
离开以前
离开以前 2021-02-07 06:14

I\'m using OSX and want get a svn repo into a local git repo using sourcetree.

When I add a bookmark using sourcetree using SVN URL, thus sourcetree<

10条回答
  •  天命终不由人
    2021-02-07 07:11

    Or, if you don't have Xcode, just CommandLineTools (this is on ElCapitan 10.11.6):

    sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/SVN /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/SVN
    sudo ln -s /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level/auto/SVN /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/auto/SVN
    

    If you previously linked some older version or just made a mistake so it gives you: File exists, then you should first do

    sudo unlink /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level/SVN
    

    for whichever file was reported as already existent, of course.

    EDIT Dir doesn't exist: (suggested by @rogeriopradoj)

    mkdir -p /usr/local/git/lib/perl5/site_perl/5.18.2/darwin-thread-multi-2level
    

    EDIT Sierra:
    After upgrading to Sierra I lost CommandLineTools, so I just had to reinstall it and everything was back to normal.
    This will prompt you to install just the CommandLineTools, not the whole XCode.

    xcode-select --install

    Hope this helps someone :)

提交回复
热议问题