无法更新mac os mavericks上的路径

时间:2014-09-24 22:49:19

标签: macos bash path export

以下是我的.bash_profile

的内容
PS1=">>"


alias ls='ls -G'
export CLICOLOR=1
export LSCOLORS=Gxfxcxdxbxegedabagacad

#set SCALA_HOME variable.
export SCALA_HOME=/usr/local/bin/scala

# Added by Canopy installer on 2014-09-22
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make bashprompt show that Canopy is active, otherwise 1

VIRTUAL_ENV_DISABLE_PROMPT=1 source /Users/muralidharn/canopy/bin/activate

#add ipython path to actual PATH variable.
export PATH=$PATH:/Users/muralidharn/canopy/bin

#set JAVA_HOME , this is the way mac recommends that we do it.
#export JAVA_HOME=$(/usr/libexec/java_home)

#add maven to path
export PATH=$PATH:/Users/muralidharn/apache-maven-3.2.3/bin
export PATH=$PATH:/mynewpath
# Added by Canopy installer on 2014-09-22
# VIRTUAL_ENV_DISABLE_PROMPT can be set to '' to make bashprompt show that Canopy is active, otherwise 1
VIRTUAL_ENV_DISABLE_PROMPT=1 source /Users/muralidharn/Library/Enthought/Canopy_64bit/User/bin/activate

我的PATH变量未使用我导出的任何路径进行更新。有人能告诉我我做错了什么,因为我感觉它是一种非常愚蠢的东西,我只是没有看到。我尝试重新启动终端,重新启动计算机,源.bash_profile等...已经。

提前感谢您的帮助。

1 个答案:

答案 0 :(得分:0)

我不确定这是否适合您,但我会试试这个语法:

export PATH=\
/usr/local/bin:\
/usr/local/sbin:\
/opt/local/bin:\
/opt/local/sbin:\
$HOME/Dropbox/bin:\
$HOME/bin:\
$HOME/usr:\
/usr/X11/bin:\
/usr/bin:\
/bin:\
/usr/sbin:\
/sbin:\
/Homes/usr/local/bin:\
/vnmr/bin:\
$HOME/Rosetta/main/source/bin

(显然,使用上面的路径。这只是我如何设置我的方法的一个例子。)


另外,将它放在bash配置文件的顶部:

#!/bin/bash