路径错误:"not a valid identifier"



我必须在Mac上安装新硬盘驱动器,并且在设置开发人员环境时,我在终端(iTerm2(中收到此错误/消息:

-bash: unset: 'PATH=/usr/local/opt/icu4c/bin:/usr/local/share/npm/bin:/Users/(mycomputername(/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/(mycomputername(/bin':不是有效的标识符

从我到目前为止能够研究自己的情况来看,这可能与使用 brew 安装节点有关。(我可能是错的。

仅供参考:

哪个红宝石/usr/bin/ruby

哪个节点/usr/local/bin/node

哪个蟒蛇/usr/local/bin/python

另外,我正在使用这些说明进行设置。我知道此列表中的一些内容已过时:

https://github.com/nicolashery/mac-dev-setup

编辑

~/.bash_profile的内容

# Add Homebrew /usr/local/bin and User ~/bin to the $PATH 
PATH=/usr/local/bin:$PATH PATH=$HOME/bin:$PATH 
export PATH 
# Load the shell dotfiles, and then some: # * ~/.path can be used to extend $PATH. 
# * ~/.extra can be used for other settings you don’t want to commit. 
for file in ~/.{path,bash_prompt,exports,aliases,functions,extra}; 
do [ -r "$file" ] && source "$file" 
done 
unset fileexport PATH="/usr/local/opt/icu4c/bin:$PATH" 
export PATH="/usr/local/opt/icu4c/sbin:$PATH"

问题是你~/.bash_profile中的这一行:

unset fileexport PATH="/usr/local/opt/icu4c/bin:$PATH"

#注释掉它并重新启动iTerm2

相关内容

  • 没有找到相关文章

最新更新