2019-12-04 15:39:41 +00:00
# MacOS Instructions
2019-12-09 12:53:40 +00:00
## Get XCode Command Line Tools
2019-12-01 08:21:20 +00:00
2019-12-18 21:46:09 +00:00
To check if you already have the XCode Command Line Tools installed via the CLI, run:
2019-12-01 08:21:20 +00:00
2019-12-06 15:26:03 +00:00
```sh
2019-12-09 12:53:40 +00:00
xcode-select -p
2019-12-06 15:26:03 +00:00
```
2019-12-18 21:46:09 +00:00
If this command returns a path, you can move on to the next step. Otherwise, to install via the CLI, run:
2019-12-06 15:26:03 +00:00
```sh
2019-12-09 12:53:40 +00:00
xcode-select --install
2019-12-06 15:26:03 +00:00
```
2019-12-09 12:53:40 +00:00
To update, run:
2019-12-06 15:26:03 +00:00
```sh
2019-12-09 12:53:40 +00:00
sudo rm -rf /Library/Developer/CommandLineTools
xcode-select --install
2019-12-06 15:26:03 +00:00
```
2019-12-09 12:53:40 +00:00
## Get HomeBrew
2019-12-18 21:46:09 +00:00
We recommend that MacOS users use [HomeBrew ](https://brew.sh ) to install each the necessary packages.
2019-12-09 12:53:40 +00:00
Check if you have HomeBrew:
2019-12-06 15:26:03 +00:00
```sh
2019-12-09 12:53:40 +00:00
brew -v
2019-12-06 15:26:03 +00:00
```
2019-12-18 21:46:09 +00:00
This command returns a version number if you have HomeBrew installed and nothing otherwise.
2019-12-06 15:26:03 +00:00
2019-12-09 12:53:40 +00:00
In your terminal, enter this command to install Homebrew:
2019-12-06 15:26:03 +00:00
```sh
2019-12-09 12:53:40 +00:00
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
2019-12-06 15:26:03 +00:00
```
2019-12-09 12:53:40 +00:00
Use the command `brew install` to install the following packages:
2019-12-01 08:21:20 +00:00
```sh
2019-12-11 15:38:04 +00:00
brew install go bzr jq pkg-config rustup
2019-12-01 08:21:20 +00:00
```
2019-12-18 18:48:15 +00:00
Clone
2019-12-06 15:26:03 +00:00
2019-12-09 12:53:40 +00:00
```sh
git clone https://github.com/filecoin-project/lotus.git
cd lotus/
```
2019-12-06 15:26:03 +00:00
2019-12-18 18:48:15 +00:00
Build
2019-12-01 08:21:20 +00:00
```sh
2019-12-11 15:38:04 +00:00
make clean & & make all
2019-12-09 12:53:40 +00:00
sudo make install
2019-12-01 08:21:20 +00:00
```
2019-12-18 21:46:09 +00:00
After installing Lotus, you can run the `lotus` command directly from your CLI to see usage documentation. Next, you can join the [Lotus Testnet ](https://docs.lotu.sh/en+join-testnet ).