MacOS under SVN migration git stomp Pit

Source: Internet
Author: User
Tags stomp svn

1. First Blood

Prior to the SVN-to-git migration in the Windows environment, it was easy to refer to the official documentation.
In the MacOS environment (MacOS High Sierra 10.13.2), enter:

$ git svn

The magical thing happened and reported the following error:

Can ' t locate svn/core.pm in @INC (need to install the Svn::core module) (@INC contains:/usr/local/git/lib/perl5/s ite_perl/5.18.2/darwin-thread-multi-2level/usr/local/git/lib/perl5/site_perl/5.18.2/usr/local/git/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/USR/LOCAL/GIT/LIB/PERL5/SITE_PERL/GIT/SVN/UTILS.PM line 6.BEGIN failed--compilation aborted at/usr/local/git/lib /PERL5/SITE_PERL/GIT/SVN/UTILS.PM line 6.Compilation failed in require at/usr/local/git/lib/perl5/site_perl/git/ SVN.PM line 25.BEGIN failed--compilation aborted at/usr/local/git/lib/perl5/site_perl/git/svn.pm line 32.Compilation Failed in require AT/USR/LOCAL/GIT/LIBEXEC/GIT-CORE/GIT-SVN Line 21.BEGIN failed--compilation aborted AT/USR/LOCAL/GIT/LIBEXEC/GIT-CORE/GIT-SVN line 21. 

Look at the error content preliminary analysis should be SVN installation problem, MacOS is self-brought svn, guess SVN damage need to reinstall, Google found after the reload method:

    • Install Command line Tools
$ xcode-select --install

Choose to install wait 5-6 minutes just fine

    • Create a soft link
$ 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
2. Double Kill
ln: /System/Library/Perl/Extras/5.18/SVN: Operation not permitted

After Google again, it is understood that the above operation is invalid due to the El Capitan system protection mechanism. But, although cannot write/system, but can write/library.
To modify a path:

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

Enter git svn the validation again, and the result is an error. Re-analysis, Git's regular commands, such as updates, submissions, etc. can be used normally, but git svn execution will be error, will not be a component in Git problem, Google later found can be installed separately:

$ brew install git svn

The result again error, hint Xcode version is too low, want me to upgrade Xcode. Before a period of time did not do xcode in order to clean up the space to remove Xcode, re-download 5.5G, instant egg pain.

Updating Homebrew...Error: Your Xcode (8.3.2) is too outdated.Please update to Xcode 9.2 (or delete it).Xcode can be updated from the App Store.

While the download process continues to Google to see if there is any other solution, finally in the pale, after finding a final solution.

4. The ultimate approach
    • Open the user agreement, and finally select agree.
$ sudo xcodebuild -license
    • Install Command line Tools
    • Installing Svn::core packages with CPAN

      CPAN is a Perl tool for downloading, installing, updating, and managing

    • Adding environment variables
#vim ~/.profile:export PATH=/Library/Developer/CommandLineTools/usr/bin:$PATH
    • Re-install GIT,SVN
$ brew reinstall git$ brew reinstall subversion

Re-enter git svn validation, problem resolution.

Resources:
[1] GIT-SCM:
Https://git-scm.com
[2]
https://paulschreiber.com/blog/2015/11/09/fixing-git-svn-on-os-x-el-capitan/

MacOS under SVN migration git stomp Pit

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.