The solution to install the SVN plugin javaHL not available under Mac

background:

The reason for installing this is to use svn gap svnkit before


This error is reported when merging the code.


text:

After installing the Eclipse plug-in svnEclipse plug-in under Mac, the following pop-up box will pop up every time you open Eclipse:

You are prompted that the JavaHL Library is missing from your machine.

Select Eclipse→Preferences→Team→SVN, and you can see that the definition of the SVN interface Client is as follows:

technology sharing

This shows that JavaHL is missing in the current system and needs to be installed manually.

The introduction given on the subeclipse official website (http://subclipse.tigris.org/wiki/JavaHL may be very slow to open) says that there are two ways to install the JavaHL Library on a Mac computer (OS X), one is through MacPort , one is in the form of HomeBrew. as the picture shows:

Here we mainly introduce the use of HomeBrew to implement the installation.

Step 1: Install HomeBrew:

The installation of HomeBrew depends on XCode and Commond Line. The specific installation steps are as follows:

1. Install Xcode
2. Install the command line tools, open the terminal, and enter the command:
         xcode-select - - install so that the system after mac 10.9 will install command line tools
3. Install brew, open the terminal, and enter the command:
        curl -LsSf  http://github.com/mxcl/homebrew/tarball/master  | sudo tar xvz -C/usr/local --strip 1
4. Update brew, open the terminal, and enter the command: (ignorable)
         brew update
5. Diagnose the system, open the terminal, and enter the command: (ignorable)
         brew doctor

HomeBrew的安装过程介绍网上也有很多教程,比如:

http://brew.sh/    --官网

http://www.jb51.net/os/MAC/101860.html   

http://www.cnblogs.com/liulipeng/p/3938518.html

就不更多介绍了,如果安装过程遇到了问题,百度下基本都能解决的。

 

步骤2:执行命令,安装JavaHL

进入终端,键入如下命令:

brew install --universal --java subversion

但是会遇到如下问题,提示有个包下不到,原因你懂得,被墙了。

==> Downloading https://www.apache.org/dyn/closer.cgi?path=subversion/subversion
Already downloaded: /Library/Caches/Homebrew/subversion-1.8.13.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 25386 (offset 20 lines).
patching file subversion/bindings/swig/perl/native/Makefile.PL.in
==> Downloading https://serf.googlecode.com/svn/src_releases/serf-1.3.8.tar.bz2

curl: (7) Failed to connect to serf.googlecode.com port 443: Operation timed out
Error: Failed to download resource "subversion--serf"
Download failed: https://serf.googlecode.com/svn/src_releases/serf-1.3.8.tar.bz2

这个问题也有解决的办法,那就是下载对应的包,放在对应的目录下,这样就能再安装JavaHL的过程中跳过serf-1.3.8.tar.bz2的下载了。

步骤2.1:下载serf-1.3.8.tar.bz2包:

http://download.csdn.net/detail/shanwenchao/8653245

下载后放在任意目录,将名称修改为:subversion--serf-1.3.7.tar.bz2

步骤2.2:将改名后的该文件放在目录下:

将修改后的文件放在/Library/Caches/Homebrew目录下。

 

步骤2.3:重新执行安装命令,安装JavaHL:

brew install --universal --java subversion

这是就不会下载而是直接从文件目录中取该包了。如下过程:

 brew install --universal --java subversion
Warning: subversion: --java was deprecated; using --with-java instead!
==> Downloading https://www.apache.org/dyn/closer.cgi?path=subversion/subversion
Already downloaded: /Library/Caches/Homebrew/subversion-1.8.13.tar.bz2
==> Patching
patching file configure
Hunk #1 succeeded at 25386 (offset 20 lines).
patching file subversion/bindings/swig/perl/native/Makefile.PL.in
==> Downloading https://serf.googlecode.com/svn/src_releases/serf-1.3.8.tar.bz2
Already downloaded: /Library/Caches/Homebrew/subversion--serf-1.3.8.tar.bz2
==> /usr/local/opt/scons/bin/scons PREFIX=/usr/local/Cellar/subversion/1.8.13/li
==> /usr/local/opt/scons/bin/scons install
==> ./configure --prefix=/usr/local/Cellar/subversion/1.8.13 --with-zlib=/usr --with-sqlite=/usr/local/opt/sqlite --with-serf=/usr/local/Cellar/subversion/1.8.13/libexec/serf --disa
==> make
==> make install
==> make tools
==> make install-tools
==> make javahl
==> make install-javahl
==> Caveats
svntools have been installed to:
  /usr/local/opt/subversion/libexec

You may need to link the Java bindings into the Java Extensions folder:
  sudo mkdir -p /Library/Java/Extensions
  sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary
??  /usr/local/Cellar/subversion/1.8.13: 119 files, 18M, built in 11.3 minutes

整个安装过程会持续很长时间,千万不要中途关掉终端。


步骤2.4:执行命令绑定Java环境和Java延伸目录的关系:

正如上面安装过程最后提示的那样:

You may need to link the Java bindings into the Java Extensions folder:
  sudo mkdir -p /Library/Java/Extensions
  sudo ln -s /usr/local/lib/libsvnjavahl-1.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib

依次在终端中执行上面两句命令,整个安装过程就完成了。

安装后,在进入Eclipse查看SVN Client的配置如下:


问题解决~!

 

纵观整个安装过程,简要来说分为如下过程:

1:安装Brew;

2:下载包,改名,放在指定目录下;

3: Execute the installation command and its supplementary commands;

 

Most of the posts on the Internet that introduce the solution to JavaHL not available only introduce the first and third parts, but the second part is missing. I don't know if they are all installed by FQ or installed abroad, so they have not encountered a wall. Caused the problem that the corresponding file could not be downloaded. Step 2 is now added, hoping to help you solve this problem.

Reference introduction: http://www.mamicode.com/info-detail-860914.html

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325213675&siteId=291194637