zsh: bad CPU type in executable: /usr/local/bin/git

When installing nvm on MAC, an error is reported zsh: bad CPU type in executable: /usr/local/bin/git

Find the reason:
You where gitcan see that there are 2 paths,
one /usr/bin/git and one /usr/bin/local/git
which gitreturns /usr/bin/local/git
and /usr/bin/local/git --version also reports This error zsh: bad CPU type in executable
should be because the mac comes with git, and I installed another git, which caused a conflict. The
solution is to uninstall the git installed by myself
sh /usr/local/git/uninstall.sh
and then it is ok.
Continue to install nvm

sudo curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.2/install.sh | bash

Then execute nvm and report an error: zsh: command not found: nvm
Just paste the following paragraph into ~/.bash_profile, and manually create one if the file does not exist.

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

Guess you like

Origin blog.csdn.net/qq_41028148/article/details/127029554
zsh