How to build and install the Java IOTA Reference Implementation (IRI) on macOS
Information
https://iota.readme.io/docs/install-iri
https://github.com/iotaledger/iri
Operating system used
macOS 10.12 Sierra
Software prerequisites
Java 8u66 or higher
Homebrew
Procedure
- MacOS Sierra comes with a "system Ruby 2.0.0p645" pre-installed.
Do not use the system Ruby.
First install Ruby Version Manager (RVM):
Type: \curl -L https://get.rvm.io | bash -s stable
Output:
Installing RVM to /Users/robertlie/.rvm/
Adding rvm PATH line to /Users/robertlie/.profile /Users/robertlie/.mkshrc /Users/robertlie/.bashrc /Users/robertlie/.zshrc.
Adding rvm loading line to /Users/robertlie/.profile /Users/robertlie/.bash_profile /Users/robertlie/.zlogin.
Installation of RVM in /Users/robertlie/.rvm/ is almost complete:
* To start using RVM you need to run `source /Users/robertlie/.rvm/scripts/rvm`
in all your open shell windows, in rare cases you need to reopen all shell windows.
* WARNING: '~/.profile' file found. To load it into your shell, add the following line to '/Users/robertlie/.bash_profile':
source ~/.profile
Note:
.bash_profile is modified.
- Install xcode-select:
Type: xcode-select --install
Note:
If you do not install xcode-select you will get this error message when isntalling ruby (next step):
dyld: lazy symbol binding failed: Symbol not found: _utimensat
- Install latest ruby version.
Type: rvm install ruby-2.4.2
Note:
If you want to know the latest version, see:
http://www.ruby-lang.org/en/downloads/
- Check ruby version.
Type: ruby -v
ruby 2.4.2
- Install maven.
Type: brew install maven
- Install Java IOTA Reference Implementation (IRI) source code.
Type: mkdir ~/tools
Type: mkdir ~/tools/iota_mainnet
Type: cd tools/iota_mainnet
Type: git clone https://github.com/iotaledger/iri
Type: cd iri
- Show current git branch.
Type: git branch -a
Output:
* dev
remotes/origin/HEAD -> origin/dev
remotes/origin/dev
:
- Show all tags.
Type: git tag -l
Output:
:
v1.3.2.2
v1.4.0
v1.4.0-testnet
:
- Checkout a tagged version:
Type: git checkout tags/v1.4.0
- Show current git branch.
Type: git branch -a
Output:
* (HEAD detached at v1.4.0)
dev
:
- Build the Java code.
Type: mvn clean compile && mvn package
- The compiled iri-xxx.jar file can be found at:
~/tools/iota_mainnet/iri/target
|