![将 SVN 存储库转换为 git](https://linux22.com/image/677192/%E5%B0%86%20SVN%20%E5%AD%98%E5%82%A8%E5%BA%93%E8%BD%AC%E6%8D%A2%E4%B8%BA%20git%20.png)
$ svn --version
svn, version 1.8.9 (r1591380)
$ git --version
git version 1.7.1
$ git svn clone http://host/path/to/project/
Initialized empty Git repository in /home/user/to/project/.git/
Can't load '/usr/local/lib64/perl5/auto/SVN/_Core/_Core.so' for module SVN::_Core: /usr/local/lib64/perl5/auto/SVN/_Core/_Core.so: undefined symbol: svn_swig_pl_thunk_gnome_keyring_unlock_prompt at /usr/lib64/perl5/DynaLoader.pm line 200.
at /usr/local/lib64/perl5/SVN/Base.pm line 59
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/SVN/Core.pm line 5.
Compilation failed in require at /usr/libexec/git-core/git-svn line 41.
如果我使用较新的 git:
$ /opt/git/bin/git --version
git version 2.7.0.GIT
我得到:
Can't load '/usr/local/lib64/perl5/auto/SVN/_Core/_Core.so' for module SVN::_Core: /usr/local/lib64/perl5/auto/SVN/_Core/_Core.so: undefined symbol: svn_swig_pl_thunk_gnome_keyring_unlock_prompt at /usr/lib64/perl5/DynaLoader.pm line 200.
at /usr/local/lib64/perl5/SVN/Base.pm line 59
BEGIN failed--compilation aborted at /usr/local/lib64/perl5/SVN/Core.pm line 5.
Compilation failed in require at /opt/git/share/perl5/Git/SVN/Utils.pm line 6.
BEGIN failed--compilation aborted at /opt/git/share/perl5/Git/SVN/Utils.pm line 6.
Compilation failed in require at /opt/git/share/perl5/Git/SVN.pm line 32.
BEGIN failed--compilation aborted at /opt/git/share/perl5/Git/SVN.pm line 32.
Compilation failed in require at /opt/git/libexec/git-core/git-svn line 21.
答案1
似乎你错过了 subversion-perl 包
# yum provides "*/_Core.so"
subversion-perl-1.6.11-15.el6_7.x86_64 : Perl bindings to the Subversion libraries
Repo : updates
Matched from:
Filename : /usr/lib64/perl5/vendor_perl/auto/SVN/_Core/_Core.so
我注意到路径 /usr/lib64/.../_Core/_Core.so 特定于 subversion 1.6.x,同时对于版本 1.8.x,它将是 /usr/local/lib64/.../_Core/_Core.so。至少对于 wandisco 包来说
颠覆版本 1.8.x
# rpm -qa | grep subversion
subversion-1.8.15-1.x86_64
subversion-tools-1.8.15-1.x86_64
subversion-perl-1.8.15-1.x86_64
# rpm -qf /usr/local/lib64/perl5/auto/SVN/_Core/_Core.so
subversion-perl-1.8.15-1.x86_64
# strings /usr/local/lib64/perl5/auto/SVN/_Core/_Core.so | grep svn_swig_pl_thunk_gnome_keyring_unlock_prompt
svn_swig_pl_thunk_gnome_keyring_unlock_prompt
颠覆版本 1.6.x
# rpm -qa | grep subversion
subversion-perl-1.6.23-4.x86_64
subversion-1.6.23-4.x86_64
subversion-tools-1.6.23-4.x86_64
# rpm -ql subversion-perl | grep _Core.so
/usr/lib64/perl5/vendor_perl/auto/SVN/_Core/_Core.so
# strings /usr/lib64/perl5/vendor_perl/auto/SVN/_Core/_Core.so | grep svn_swig_pl_thunk_gnome_keyring_unlock_prompt
对我来说,我更喜欢svn2git用 ruby 编写的实用程序。它更舒适
答案2
export LD_LIBRARY_PATH=/usr/local/lib64/perl5/Alien/SVN