Building Zcashd & Zcash-cli on macOS

Zcashd & Zcash-cli are “best effort” supported for macOS. It’s ok to use it and develop on it–we sure do. The level of testing and integration is not up to par with our standards to call this officially supported.

Instructions

Currently, the only way to install Zcashd & Zcash-cli on macOS is to build from source. Instructions below.

  1. Get dependencies by running the command in Terminal. If already installed, skip that step.

    • MacOS command line tools:

      xcode-select --install
      
    • Homebrew:

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

      brew install git pkgconfig automake autoconf libtool coreutils
      
    • Pip:

      sudo easy_install pip
      
    • Python modules for rpc-tests:

      sudo pip install pyblake2 pyzmq
      
  2. Download the source code from the repository:

     git clone https://github.com/zcash/zcash.git
     cd zcash/
     git checkout v5.10.0
     ./zcutil/fetch-params.sh
    

    This step includes fetching zcash parameters, which are numerical dependencies for Zcash a result of the crypto inside. They are around 760 MB in size, so it will take time to download them.

  3. Build Zcashd & Zcash-cli

    ./zcutil/clean.sh
    ./zcutil/build.sh -j$(sysctl -n hw.ncpu)
    

    Note: There is an existing bug for macOS Mojave (10.14) that causes a failure in building Zcash. A work around for this includes one more step before the build: open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg

Next steps

Now that you’ve built Zcashd & Zcash-cli, we can move on to the next steps of: configuration, sync, and use. Refer back to the Zcashd & Zcash-cli page for further instructions.