I’ll introduce how to install asdf on M1 macOS.
Prerequisites
- CPU: M1
- OS: macOS Monterey 12.5.1
- Shell: zsh
Downloading asdf
Following the official documentation Getting Started | asdf, we’ll proceed with downloading and installing asdf.
brew install asdf
Installing asdf.sh
Add asdf.sh to .zshrc using one of the following methods:
Execute one-liner command with `echo -e`
echo -e "n. $(brew --prefix asdf)/libexec/asdf.sh" >> ~/.zshrc
Edit `.zshrc` directly
Following the message displayed at the end of brew install asdf:
To use asdf, add the following line to your ~/.zshrc:
. /opt/homebrew/opt/asdf/libexec/asdf.sh
Add the following to ~/.zshrc:
. /opt/homebrew/opt/asdf/libexec/asdf.sh
That’s all from the Gemba, where I installed asdf on M1 macOS.