I tried installing hombrew for mac os and faced some issues while adding to path, now terminal welcomes me with this messages, how can I fix it?
.zprofile:export:4: not valid in this context: export HOMEBREW_PREFIX
.zshrc:export:1: not valid in this context: Support/JetBrains/Toolbox/scripts
.zprofile :
# Added by Toolbox App
export PATH="$PATH:/Users/randus/Library/Application Support/JetBrains/Toolbox/scripts"eval "$(/opt/homebrew/bin/brew shellenv)"
eval "$(/opt/homebrew/bin/brew shellenv)"
.zshrc :
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Library/Apple/usr/bin:/Users/randus/Library/Application Support/JetBrains/Toolbox/scripts
.zprofile
and.zshrc
to your question. – Marlon Richert Sep 02 '22 at 16:51homebrew
andMacPorts
for several years - is this:MacPorts
is a far better choice for a macos package manager thanhomebrew
. But don't take my word for it - research this yourself. – Seamus Sep 02 '22 at 16:59~/.zprofile
contained:export 'export HOMEBREW_PREFIX'
and~/.zshrc
containedexport Support/JetBrains/Toolbox/scripts
– Stéphane Chazelas Sep 02 '22 at 17:50export
as dual keyword/builtins like ksh does. Soexport var=$(cmd)
no longer subjects the command substitution to word splitting.not valid in this context: export HOMEBREW_PREFIX
is evidence that the space betweenexport
andHOMEBREW_PREFIX
didn't trigger splitting. – Stéphane Chazelas Sep 02 '22 at 17:52export var=$(cmd)
is no longer a list context asvar=$(cmd)
is interpreted as assignment – Stéphane Chazelas Sep 05 '22 at 07:49