MacOS
These instructions are specific to macOS. You can install Lotus on macOS 10.11 El Capitan or higher. If you are installing Lotus on a Linux distribution, head over to the Linux section.
There are several ways to install Lotus on macOS:
Install with Homebrew
You can quickly install Lotus using Homebrew on macOS.
Add the
filecoin-project/lotustap:brew tap filecoin-project/lotusInstall Lotus:
brew install lotusYou should now have Lotus installed. You can now start the Lotus daemon.
Build from source
You can build the Lotus executables from source by following these steps.
Software dependencies
You must have XCode and Homebrew installed to build Lotus from source.
XCode Command Line Tools
Lotus requires that X-Code CLI tools be installed before building the Lotus binaries.
Check if you already have the XCode Command Line Tools installed via the CLI, run:
xcode-select -pThis should output something like:
/Library/Developer/CommandLineToolsIf this command returns a path, then you have Xcode already installed! You can move on to installing dependencies with Homebrew. If the above command doesnβt return a path, install Xcode:
xcode-select --install
Next up is installing Lotus' dependencies using Homebrew.
Homebrew
We recommend that macOS users use Homebrew to install each of the necessary packages.
Use the command
brew installto install the following packages:brew install go bzr jq pkg-config hwloc coreutils
Next up is cloning the Lotus repository and building the executables.
Rust
Rustup is an installer for the systems programming language Rust. Run the installer and follow the onscreen prompts. The default installation option should be chosen unless you are familiar with customisation:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
Build and install Lotus
The installation instructions are different depending on which CPU is in your Mac:
M1-based CPUs
Clone the repository:
git clone https://github.com/filecoin-project/lotus.git cd lotus/Switch to the latest stable release branch:
git checkout releasesThe
releasesbranch always contains the latest stable release for Lotus. If you want to checkout to a network other than mainnet, take a look at the Switching networks guide βCreate the necessary environment variables to allow Lotus to run on M1 architecture:
export LIBRARY_PATH=/opt/homebrew/lib export FFI_BUILD_FROM_SOURCE=1 export PATH="$(brew --prefix coreutils)/libexec/gnubin:/usr/local/bin:$PATH"Build the
lotusdaemon:make allRun the final
makecommand to move thislotusexecutable to/usr/local/bin. This allows you to runlotusfrom any directory.sudo make installYou should now have Lotus installed. You can now start the Lotus daemon.
Intel CPUs
Clone the repository:
git clone https://github.com/filecoin-project/lotus.git cd lotus/Switch to the latest stable release branch:
git checkout releasesThe
releasesbranch always contains the latest stable release for Lotus. If you want to checkout to a network other than mainnet, take a look at the Switching networks guide βIf you are in China, take a look at some tips for running Lotus in China".
Build and install Lotus:
make clean all sudo make install