Search code examples
macosperlgit-svn

git-svn Can't locate SVN/Core.pm after fresh installation of macOS Catalina 10.15.4


Recently I reinstalled macOS Catalina 10.15.4. After I installed Command_Line_Tools_11.4.1, it told me svn is no longer working with Xcode. Then I installed both git and svn by brew, hopefully git-svn would work. Unfortunately got this error message:

Can't locate SVN/Core.pm in @INC (you may need to install the SVN::Core module) (@INC contains: /usr/local/Cellar/git/2.26.2/share/perl5 /Applications/Xcode.app/Contents/Developer/Library/Perl/5.18/darwin-thread-multi-2level /Library/Developer/CommandLineTools/Library/Perl/5.18/darwin-thread-multi-2level /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.4 /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 /usr/local/Cellar/git/2.26.2/share/perl5/Git/SVN/Utils.pm line 6.

Both git & svn are the latest version.

Please help me out.


Solution

  • Finally I figure it out!!!

    Open the git-svn file (perl script, in my case file location is /usr/local/opt/git/libexec/git-core/git-svn), change the first line #!/usr/bin/perl to #!/usr/local/bin/perl

    And it works!

    I guess system perl doesn't include perl SVN/Core, but brew perl has it (dependency of brew svn).