svn for eclipse on mac os lion

血红的双手。 提交于 2019-11-29 17:41:18

问题


I need to use Subversion with Eclipse on Mac Lion. I encounter problem as below

I saw: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error

In my context:

  • I use Mac OS Lion 10.7.2
  • Eclipse version: 3.7.1 64 bit
  • I install Subversion: Universal Subversion 1.6.17 Binaries for Lion (Mac OS X 10.7) in the page: http://www.open.collab.net/downloads/community/
  • I install Subclipse by the "Install New Software..." feature of Eclipse with the update link: http://subclipse.tigris.org/update_1.8.x It install Subclipse 1.8.2, JavaHL 1.7.1.1 and some other packages.
  • When I go to menu Preferences/ Team / SVN , it produce error: "Incompatible JavaHL library loaded. 1.7.x or later required."
  • I find to install SVN Kit, so use it instead of JavaHL as the very first link refer (here), but I don't see it in Subclipse package.

回答1:


The issue is that you need the right native Subversion libraries for the version of Subclipse you use. This page has information and a chart of the versions:

http://subclipse.tigris.org/wiki/JavaHL

The binaries on CollabNet website are still for SVN 1.6 so you either need to get SVN 1.7 binaries (MacPorts and Homebrew are good places to get it) or you need to use Subclipse 1.6.x.




回答2:


Follow the steps as below to get it working:

  1. Install subclipse via update url: http://subclipse.tigris.org/update_1.8.x
  2. Install subversion using the binary from here: http://www.ubersvn.com/download (scroll down to "Command-Line Client 1.6.18 and 1.7.6 certified by WANdisco" section since that's all you need)



回答3:


I found a solution (download from WanDisco instead of CollabNet) in this thread: Subclipse in Mac OS Lion shows "Unable to load default SVN client" error




回答4:


I went to this topic because I was in need to make SVN 1.7 to work with subclipse.

For those with the same problem, the easiest way to fix it is to install Subversion and JavaHL from MacPorts.

The packages you need to install with macports are subversion and subversion-javahlbindings (check here), they are both 1.7.1.

With these packages you can install the subclipse using the update site with version 1.8.x. (http://subclipse.tigris.org/update_1.8.x)

If you don't have macports installed follow these instructions. I am sure it will be useful for other things too. You also need to install XCode from AppStore.




回答5:


Installing the binaries from http://www.wandisco.com/subversion/download#osx fixed this issue for me.




回答6:


In case anyone using homebrew wants SVN version 1.6 support (as I did due to interacting with some old servers), here is how I got it to work:

Install SVN 1.6 via homebrew:

brew tap homebrew/versions
brew info homebrew/versions/subversion16
brew install homebrew/versions/subversion16 --java

Ensure that /usr/local/bin is in your PATH before /usr/bin, so that homebrew's SVN is ran instead of OS X's.

If using Eclipse:

Be sure to install Subclipse 1.6 (e.g. use the 1.6 update site) instead of the newest one.

If you follow the homebrew formula instructions to link the java library to OS X's Extensions, you do NOT have to edit your Eclipse.ini file to include the path there. For posterity, those commands are:

sudo mkdir -p /Library/Java/Extensions
sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

HTH




回答7:


This post resolved my problem: http://bridgetconsulting.com/?p=64 Requires MacPorts

Add to /opt/local/etc/macports.conf this line

universal_archs         i386 x86_64

and run

sudo port install subversion-javahlbindings +no_bdb +universal



回答8:


I installed subversion 1.7 and the java-hl bindings using homebrew by following the instructions here.

Specifically:

[sudo] brew install subversion --universal --java

Then linking the installed libraries in /Library/Java/Extensions so eclipse picked them up.

/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.dylib
/Library/Java/Extensions $ sudo ln -sf /usr/local/lib/libsvnjavahl-1.jnilib



回答9:


You only installed the Java HL package. Uninstall JavaHL and install the SVN Kit. You can find options for connecting in Preferences -> Team...



来源:https://stackoverflow.com/questions/8102759/svn-for-eclipse-on-mac-os-lion

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!