回應 AD

2017年12月21日 星期四

安裝 JavaHL on MacOS 10.13.2

解決 Eclipse 用 SVN 遇到的 JavaHl(JNI) Not Available

1.
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

==> This script will install:
/usr/local/bin/brew
/usr/local/share/doc/homebrew
/usr/local/share/man/man1/brew.1
/usr/local/share/zsh/site-functions/_brew
/usr/local/etc/bash_completion.d/brew
/usr/local/Homebrew
==> The following existing directories will be made group writable:
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man8
==> The following existing directories will have their owner set to bing:
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man8
==> The following existing directories will have their group set to admin:
/usr/local/bin
/usr/local/share
/usr/local/share/man
/usr/local/share/man/man1
/usr/local/share/man/man8
==> The following new directories will be created:
/usr/local/Cellar
/usr/local/Homebrew
/usr/local/Frameworks
/usr/local/etc
/usr/local/include
/usr/local/lib
/usr/local/opt
/usr/local/sbin
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var

Press RETURN to continue or any other key to abort
==> /usr/bin/sudo /bin/chmod u+rwx /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man8
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man8
==> /usr/bin/sudo /usr/sbin/chown bing /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man8
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/bin /usr/local/share /usr/local/share/man /usr/local/share/man/man1 /usr/local/share/man/man8
==> /usr/bin/sudo /bin/mkdir -p /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod g+rwx /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/chmod 755 /usr/local/share/zsh /usr/local/share/zsh/site-functions
==> /usr/bin/sudo /usr/sbin/chown bing /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /usr/bin/chgrp admin /usr/local/Cellar /usr/local/Homebrew /usr/local/Frameworks /usr/local/etc /usr/local/include /usr/local/lib /usr/local/opt /usr/local/sbin /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var
==> /usr/bin/sudo /bin/mkdir -p /Users/bing/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Users/bing/Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown bing /Users/bing/Library/Caches/Homebrew
==> /usr/bin/sudo /bin/mkdir -p /Library/Caches/Homebrew
==> /usr/bin/sudo /bin/chmod g+rwx /Library/Caches/Homebrew
==> /usr/bin/sudo /usr/sbin/chown bing /Library/Caches/Homebrew
==> Downloading and installing Homebrew...
remote: Counting objects: 95741, done.
remote: Compressing objects: 100% (22/22), done.
remote: Total 95741 (delta 7), reused 12 (delta 1), pack-reused 95717
Receiving objects: 100% (95741/95741), 21.84 MiB | 245.00 KiB/s, done.
Resolving deltas: 100% (69473/69473), done.
From https://github.com/Homebrew/brew
* [new branch] master -> origin/master
* [new tag] 0.1 -> 0.1
* [new tag] 0.2 -> 0.2
* [new tag] 0.3 -> 0.3
* [new tag] 0.4 -> 0.4
* [new tag] 0.5 -> 0.5
* [new tag] 0.6 -> 0.6
* [new tag] 0.7 -> 0.7
* [new tag] 0.7.1 -> 0.7.1
* [new tag] 0.8 -> 0.8
* [new tag] 0.8.1 -> 0.8.1
* [new tag] 0.9 -> 0.9
* [new tag] 0.9.1 -> 0.9.1
* [new tag] 0.9.2 -> 0.9.2
* [new tag] 0.9.3 -> 0.9.3
* [new tag] 0.9.4 -> 0.9.4
* [new tag] 0.9.5 -> 0.9.5
* [new tag] 0.9.8 -> 0.9.8
* [new tag] 0.9.9 -> 0.9.9
* [new tag] 1.0.0 -> 1.0.0
* [new tag] 1.0.1 -> 1.0.1
* [new tag] 1.0.2 -> 1.0.2
* [new tag] 1.0.3 -> 1.0.3
* [new tag] 1.0.4 -> 1.0.4
* [new tag] 1.0.5 -> 1.0.5
* [new tag] 1.0.6 -> 1.0.6
* [new tag] 1.0.7 -> 1.0.7
* [new tag] 1.0.8 -> 1.0.8
* [new tag] 1.0.9 -> 1.0.9
* [new tag] 1.1.0 -> 1.1.0
* [new tag] 1.1.1 -> 1.1.1
* [new tag] 1.1.10 -> 1.1.10
* [new tag] 1.1.11 -> 1.1.11
* [new tag] 1.1.12 -> 1.1.12
* [new tag] 1.1.13 -> 1.1.13
* [new tag] 1.1.2 -> 1.1.2
* [new tag] 1.1.3 -> 1.1.3
* [new tag] 1.1.4 -> 1.1.4
* [new tag] 1.1.5 -> 1.1.5
* [new tag] 1.1.6 -> 1.1.6
* [new tag] 1.1.7 -> 1.1.7
* [new tag] 1.1.8 -> 1.1.8
* [new tag] 1.1.9 -> 1.1.9
* [new tag] 1.2.0 -> 1.2.0
* [new tag] 1.2.1 -> 1.2.1
* [new tag] 1.2.2 -> 1.2.2
* [new tag] 1.2.3 -> 1.2.3
* [new tag] 1.2.4 -> 1.2.4
* [new tag] 1.2.5 -> 1.2.5
* [new tag] 1.2.6 -> 1.2.6
* [new tag] 1.3.0 -> 1.3.0
* [new tag] 1.3.1 -> 1.3.1
* [new tag] 1.3.2 -> 1.3.2
* [new tag] 1.3.3 -> 1.3.3
* [new tag] 1.3.4 -> 1.3.4
* [new tag] 1.3.5 -> 1.3.5
* [new tag] 1.3.6 -> 1.3.6
* [new tag] 1.3.7 -> 1.3.7
* [new tag] 1.3.8 -> 1.3.8
* [new tag] 1.3.9 -> 1.3.9
* [new tag] 1.4.0 -> 1.4.0
* [new tag] 1.4.1 -> 1.4.1
Checking out files: 100% (1097/1097), done.
HEAD is now at 426c998ff Merge pull request #3584 from Quesar/fix-proxy-config
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Counting objects: 4680, done.
remote: Compressing objects: 100% (4425/4425), done.
remote: Total 4680 (delta 60), reused 1060 (delta 41), pack-reused 0
Receiving objects: 100% (4680/4680), 3.82 MiB | 653.00 KiB/s, done.
Resolving deltas: 100% (60/60), done.
Checking out files: 100% (4703/4703), done.
Tapped 4450 formulae (4,727 files, 12.0MB)
==> Cleaning up /Library/Caches/Homebrew...
==> Migrating /Library/Caches/Homebrew to /Users/bing/Library/Caches/Homebrew
==> Deleting /Library/Caches/Homebrew...
Already up-to-date.
==> Installation successful!

==> Homebrew has enabled anonymous aggregate user behaviour analytics.
Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics.html

==> Next steps:
- Run `brew help` to get started
- Further documentation:
https://docs.brew.sh

2. brew install subversion --with-java


==> Installing dependencies for subversion: pkg-config, apr, openssl, apr-util, readline, sqlite, pcre, swig, scons
==> Installing subversion dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.29.2.high_s
####### 10.######################################################################## 100.0%
==> Pouring pkg-config-0.29.2.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/pkg-config/0.29.2: 11 files, 627.2KB
==> Installing subversion dependency: apr
==> Downloading https://homebrew.bintray.com/bottles/apr-1.6.3.high_sierra.bo
########### 16.#################################################### 73.######################################################################## 100.0%
==> Pouring apr-1.6.3.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple's CLT package contains apr.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/apr/bin:$PATH"' >> ~/.bash_profile

==> Summary
🍺 /usr/local/Cellar/apr/1.6.3: 60 files, 1.3MB
==> Installing subversion dependency: openssl
==> Downloading https://homebrew.bintray.com/bottles/openssl-1.0.2n.high_sier
## 3.### 4.##### 7.###### 8.####### 10.######### 13.########### 15.############ 17.############# 18.############### 21.################# 23.###################### 31.######################### 35.############################ 39.################################## 47.######################################### 57.############################################### 66.###################################################### 76.############################################################# 85.################################################################## 92.####################################################################### 99.######################################################################## 100.0%
==> Pouring openssl-1.0.2n.high_sierra.bottle.tar.gz
==> Caveats
A CA file has been bootstrapped using certificates from the SystemRoots
keychain. To add additional certificates (e.g. the certificates added in
the System keychain), place .pem files in
/usr/local/etc/openssl/certs

and run
/usr/local/opt/openssl/bin/c_rehash

This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple has deprecated use of OpenSSL in favor of its own TLS and crypto libraries.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/openssl/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/openssl/lib
CPPFLAGS: -I/usr/local/opt/openssl/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/openssl/lib/pkgconfig

==> Summary
🍺 /usr/local/Cellar/openssl/1.0.2n: 1,792 files, 12.3MB
==> Installing subversion dependency: apr-util
==> Downloading https://homebrew.bintray.com/bottles/apr-util-1.6.1_1.high_si
############################### 43.######################################################################## 100.0%
==> Pouring apr-util-1.6.1_1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because Apple's CLT package contains apr.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/apr-util/bin:$PATH"' >> ~/.bash_profile

==> Summary
🍺 /usr/local/Cellar/apr-util/1.6.1_1: 54 files, 778.2KB
==> Installing subversion dependency: readline
==> Downloading https://homebrew.bintray.com/bottles/readline-7.0.3_1.high_si
###################### 30.################################################## 69.######################################################################## 100.0%
==> Pouring readline-7.0.3_1.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides the BSD libedit library, which shadows libreadline.
In order to prevent conflicts when programs look for libreadline we are
defaulting this GNU Readline installation to keg-only..

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/readline/lib
CPPFLAGS: -I/usr/local/opt/readline/include

==> Summary
🍺 /usr/local/Cellar/readline/7.0.3_1: 46 files, 1.5MB
==> Installing subversion dependency: sqlite
==> Downloading https://homebrew.bintray.com/bottles/sqlite-3.21.0.high_sierr
####### 10.################## 25.############################ 38.##################################### 51.################################################# 69.############################################################ 83.################################################################### 93.######################################################################## 100.0%
==> Pouring sqlite-3.21.0.high_sierra.bottle.tar.gz
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local,
because macOS provides an older sqlite3.

If you need to have this software first in your PATH run:
echo 'export PATH="/usr/local/opt/sqlite/bin:$PATH"' >> ~/.bash_profile

For compilers to find this software you may need to set:
LDFLAGS: -L/usr/local/opt/sqlite/lib
CPPFLAGS: -I/usr/local/opt/sqlite/include
For pkg-config to find this software you may need to set:
PKG_CONFIG_PATH: /usr/local/opt/sqlite/lib/pkgconfig

==> Summary
🍺 /usr/local/Cellar/sqlite/3.21.0: 11 files, 3.0MB
==> Installing subversion dependency: pcre
==> Downloading https://homebrew.bintray.com/bottles/pcre-8.41.high_sierra.bo
## 3.###### 9.############ 17.################# 24.###################### 31.######################## 33.############################### 43.################################# 45.####################################### 55.################################################ 66.########################################################## 80.################################################################# 91.######################################################################## 100.0%
==> Pouring pcre-8.41.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/pcre/8.41: 204 files, 5.3MB
==> Installing subversion dependency: swig
==> Downloading https://homebrew.bintray.com/bottles/swig-3.0.12.high_sierra.
##### 8.################### 27.########################### 38.############################### 43.######################################## 56.#################################################### 72.############################################################# 86.####################################################################### 99.######################################################################## 100.0%
==> Pouring swig-3.0.12.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/swig/3.0.12: 755 files, 5.5MB
==> Installing subversion dependency: scons
==> Downloading https://homebrew.bintray.com/bottles/scons-3.0.1.high_sierra.
######### 12.###################################### 53.######################################################### 80.######################################################################## 100.0%
==> Pouring scons-3.0.1.high_sierra.bottle.tar.gz
🍺 /usr/local/Cellar/scons/3.0.1: 211 files, 2.2MB
==> Installing subversion --with-java
==> Downloading https://www.apache.org/dyn/closer.cgi?path=subversion/subvers
==> Best Mirror http://ftp.tc.edu.tw/pub/Apache/subversion/subversion-1.9.7.t
# 1.### 5.###### 8.####### 10.######## 11.######### 13.########## 15.############ 16.############# 18.############## 20.############### 21.################ 23.################## 25.################### 26.#################### 28.##################### 30.###################### 31.######################## 33.######################### 35.########################## 36.########################### 38.############################ 40.############################## 41.############################### 43.################################ 45.################################# 46.################################## 48.#################################### 50.##################################### 51.###################################### 53.####################################### 55.######################################## 56.########################################## 58.########################################### 60.############################################ 61.############################################# 63.############################################## 65.################################################ 66.################################################# 68.################################################## 70.################################################### 71.#################################################### 73.###################################################### 75.####################################################### 76.######################################################## 78.######################################################### 80.########################################################## 81.############################################################ 83.############################################################# 85.############################################################## 86.############################################################### 88.################################################################ 90.################################################################# 91.################################################################### 93.#################################################################### 95.##################################################################### 96.###################################################################### 98.######################################################################## 100.0%
==> Patching
patching file configure
patching file subversion/bindings/swig/perl/native/Makefile.PL.in
patching file build/get-py-info.py
==> Downloading https://www.apache.org/dyn/closer.cgi?path=serf/serf-1.3.9.ta
==> Best Mirror http://ftp.twaren.net/Unix/Web/apache/serf/serf-1.3.9.tar.bz2
######## 11.######################################################################## 100.0%
==> /usr/local/opt/scons/bin/scons PREFIX=/usr/local/Cellar/subversion/1.9.7_
==> /usr/local/opt/scons/bin/scons install
==> ./configure --prefix=/usr/local/Cellar/subversion/1.9.7_1 --enable-optimi
==> make

==> make install
==> make tools
==> make install-tools
==> make swig-pl
==> make install-swig-pl
==> make javahl
==> make install-javahl
==> make swig-rb EXTRA_SWIG_LDFLAGS=-L/usr/lib
==> make install-swig-rb
==> Caveats
svntools have been installed to:
/usr/local/opt/subversion/libexec

The perl bindings are located in various subdirectories of:
/usr/local/opt/subversion/lib/perl5

If you wish to use the Ruby bindings you may need to add:
/usr/local/lib/ruby
to your RUBYLIB.

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.9.7_1: 215 files, 23.8MB, built in 11 minutes 44 seconds


3. sudo mkdir -p /Library/Java/Extensions
4. sudo ln -s /usr/local/Cellar/subversion/1.9.7_1/lib/libsvnjavahl-1.0.dylib /Library/Java/Extensions/libsvnjavahl-1.dylib