when I install brew,the terminal showed zsh: parse error near `JIA/.zprofile'

3.7k views Asked by At

When I'm trying to install homebrew on my M1 mac, it shows zsh: parse error near `JIA/.zprofile'

I ran

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then the terminal displays

zsh: parse error near `JIA/.zprofile'

Here is a screenshot of my terminal enter image description here

1

There are 1 answers

0
vrdrv On

Your last try is almost right. You have either to escape the space in your home's path or put it in quotes.

Try

(echo; echo 'eval "$(/opt/homebrew/bin/brew shellenv)"') >> "/Users/Yunnis JIA/.zprofile"