我正在使用git-svn在我的Mac上工作.我目前在Lion上(但是我在Snow Leopard上测试时得到了类似的结果.我似乎是少数几个遇到这个问题的人之一.这与我看到的一些人只有包含SVN / Core.pm的问题不同. .
下面是尝试在vanille存储库上执行git svn克隆(显然主机和目录详细信息已更改为发布):
Macbook-Pro:git david$git svn clone https://somesite.com/SVN/someRepo/ Initialized empty Git repository in /Projects/git/MyWorkspace/.git/ Can't load '/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle' for module SVN::_Core: dlopen(/System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle,1): Library not loaded: /usr/lib/libsvn_client-1.0.dylib Referenced from: /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/auto/SVN/_Core/_Core.bundle Reason: image not found at /System/Library/Perl/5.12/darwin-thread-multi-2level/DynaLoader.pm line 204. at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Base.pm line 59 BEGIN Failed--compilation aborted at /System/Library/Perl/Extras/5.12/darwin-thread-multi-2level/SVN/Core.pm line 5. Compilation Failed in require at /Developer/usr/libexec/git-core/git-svn line 58.
解决方法
在我的情况下,只需通过Macports安装git解决了我的问题.我相信这个问题可能是由较旧的安装(可能是Mac OS X Git安装程序)引起的.如果您在这种情况下,首先安装Macports:
http://www.macports.org/install.php
然后,一旦安装了Macports(使用适用于您操作系统的正确版本),然后运行:
sudo port install git-core +svn
在此之后,我只需要在Macports安装的新位置使用git:
/opt/local/bin/git
我修改了我的PATH变量,这是默认情况下使用的git.