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
Your last try is almost right. You have either to escape the space in your home's path or put it in quotes.
Try