- Clone the optimism code repository:
git clone https://github.com/ethereum-optimism/optimism.git
cd optimism
- Install Node
If you have previously installed Node version 18, which is too high and causes errors when compiling optimism, now choose Node 16.
brew install node@16
brew unlink node
brew link --force --overwrite node@16
- Install Python 2
macOS comes with Python 3 installed by default. You can download Python 2 here and select "macOS 64-bit installer".
- Run
yarn
to install dependencies
If you encounter the following error during the dependency installation process:
Try 'libtool --help' for more information.
libtool: error: unrecognised option: '-static'
It means that you may have previously installed libtool using brew. You can uninstall it:
~/github/optimism which libtool
/opt/homebrew/opt/libtool/libexec/gnubin/libtool
brew uninstall --ignore-dependencies libtool
- Run
yarn build