zcash-gitian/dependency_install_steps_by.../macOS.md

156 lines
2.9 KiB
Markdown
Raw Permalink Normal View History

2019-03-22 09:43:27 -07:00
# Dependency installation steps for macOS
This document assumes you are starting from a fresh install of macOS.
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following macOS release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% sw_vers
2020-12-21 10:53:39 -08:00
ProductName: macOS
2021-12-15 11:55:56 -08:00
ProductVersion: 12.0.1
BuildVersion: 21A559
2019-03-22 09:43:27 -07:00
```
## Make sure Git is installed
macOS includes git, so you should already have that. It may prompt you to set up developer tools if
you're using it for the first time.
2021-04-09 13:54:18 -07:00
Most recently tested 2021-04-09 with the following git release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% git --version
2021-02-22 13:11:02 -08:00
git version 2.24.3 (Apple Git-128)
2019-03-22 09:43:27 -07:00
```
## Install Homebrew
Homebrew's site gives a shell command to download and install it
https://brew.sh/
To update both the installed homebrew version and its list of formulae:
```
2020-04-22 17:13:44 -07:00
% brew update
2019-03-22 09:43:27 -07:00
```
To upgrade software installed via brew:
```
$ brew upgrade <formula name>
```
Homebrew has a search page you can use to look up formula names: http://formulae.brew.sh/
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following Homebrew release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% brew --version
2021-12-15 11:55:56 -08:00
Homebrew 3.3.8
Homebrew/homebrew-core (git revision d50fec801e7; last commit 2021-12-14)
Homebrew/homebrew-cask (git revision 9e847b02f5; last commit 2021-12-14)
2019-03-22 09:43:27 -07:00
```
## Install Virtualbox
This one may fail on the first attempt with a prompt to allow software signed by Oracle. After doing
that, the second attempt should succeed.
```
2021-04-09 13:54:18 -07:00
$ brew install virtualbox
2019-03-22 09:43:27 -07:00
```
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following Virtualbox release:
2019-03-22 09:43:27 -07:00
```
2020-01-27 09:26:38 -08:00
% VBoxManage --version
2021-12-15 11:55:56 -08:00
6.1.30r148432
2019-03-22 09:43:27 -07:00
```
## Install Vagrant
```
2021-12-15 11:55:56 -08:00
$ brew install vagrant
2019-03-22 09:43:27 -07:00
```
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following Vagrant release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% vagrant --version
2021-12-15 11:55:56 -08:00
Vagrant 2.2.19
2019-03-22 09:43:27 -07:00
```
## Install GnuPG 2.x (2.11.18 or greater)
```
$ brew install gnupg
```
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following GnuPG release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% gpg --version
2021-12-15 11:55:56 -08:00
gpg (GnuPG) 2.3.3
libgcrypt 1.9.4
2019-03-22 09:43:27 -07:00
[...]
```
## Install Python 3.x
2021-12-15 11:55:56 -08:00
As of this writing, python 3.9.9 is installed by default in macOS, which should work fine. You ca
2019-11-01 14:39:12 -07:00
optionally install the 'python' homebrew package to get a later version.
2019-03-22 09:43:27 -07:00
```
$ brew install python
```
2019-11-01 14:39:12 -07:00
Note that to run python 3.x you need to use the name `python3`; running `python` will run python
2.x.
2019-03-22 09:43:27 -07:00
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following Python release:
2019-03-22 09:43:27 -07:00
```
2019-11-01 14:39:12 -07:00
% python3 --version
2021-12-15 11:55:56 -08:00
Python 3.9.9
2019-03-22 09:43:27 -07:00
```
# Install direnv (Optional/Recommended)
This tool sets and unsets environment variables as you change directories in a shell session,
2019-03-28 22:51:30 -07:00
providing a convenient facility for setting up project-specific configuration.
2019-03-22 09:43:27 -07:00
```
brew install direnv
```
To activate direnv when starting bash (the default shell on macOS), add the following line to the
end of `~/.profile`:
```
eval "$(direnv hook bash)"
```
direnv also supports several other shells -- zsh, fish, tcsh, and elvish as of this writing. Its
website includes instructions for enabling each of the shells it supports.
2021-12-15 11:55:56 -08:00
Most recently tested 2021-12-14 with the following direnv release:
2019-03-22 09:43:27 -07:00
```
2020-04-22 17:13:44 -07:00
% direnv --version
2021-12-15 11:55:56 -08:00
2.29.0
2019-03-22 09:43:27 -07:00
```