2017-07-11 39 views
0
到源代码的.bash_profile

我加入以下行.bash_profile中无法在Mac

export SASE_HOME = /Users/Amar/Downloads/sase-master 

当我试图源,我收到以下错误

[email protected]:~$ source ~/.bash_profile 
    -bash: export: `=': not a valid identifier 
    -bash: export: `': not a valid identifier 
    -bash: export: `=': not a valid identifier 
    -bash: export: `/Users/Amar/Downloads/sase-master': not a valid identifier 
+2

Bash中变量赋值中的'='周围不能有空格。 – janos

回答

0

试试这个:

export SASE_HOME="/Users/Amar/Downloads/sase-master" 
+0

仍然收到错误源〜/ .bash_profile -bash:export:'=':不是一个有效的标识符 -bash:export:'':不是一个有效的标识符 –

+0

我想我搞砸了bash_profile文件中的其他一行(因为即使在评论此行时我也会遇到同样的错误)。有没有办法,我可以收到堆栈跟踪显示,在bash_profile –

+1

@AmarjitSingh有问题的行号这听起来像你可能忘记了关闭前一行的报价,或使用“智能”报价而不是一个普通的ASCII报价。 – chepner