PATH 包含无效字符

PATH 包含无效字符

由于 Home-brew 无法正常工作,所以我在 Mac 上调整了 PATH。我的路径可以分为三个版本:

干净路径是最理想的路径,因为我不再使用 Pebble 的 SDK。混乱路径是原始的混乱路径。旧路径是删除了错误的混乱路径

 Nasty path

   /opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/peterkaminski/anaconda/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0- BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/Users/peterkaminski/apache-ant-1.9.3


Clean path

/opt/local/bin:/opt/local/sbin:/Users/peterkaminski/anaconda/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/Users/peterkaminski/apache-ant-1.9.3


OLD PATH


/opt/local/bin:/opt/local/sbin:/opt/local/bin:/opt/local/sbin:/Users/peterkaminski/anaconda/bin:“/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin:/Users/peterkaminski/apache-ant-1.9.3/bin:??

我的 ~/.bash_profile 的恶意路径如下所示:(请原谅我,我已经花了大约一个小时试图修复它,所以它看起来很糟糕)

JAVA_HOME="/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home"
ANT_HOME="/Users/peterkaminski/apache-ant-1.9.3"
LES_SDK="/Users/peterkaminski/Lexmark"


export PATH=~/pebble-dev/PebbleSDK-2.0-BETA4/bin:$PATH
export PATH=~/pebble-dev/PebbleSDK-2.0-BETA4/bin:$PATH
export PATH=~/pebble-dev/PebbleSDK-2.0-BETA5/bin:$PATH
export PATH=~/pebble-dev/PebbleSDK-2.0-BETA5/bin:$PATH

export JAVA_HOME
export ANT_HOME
export LES_SDK

PATH=“/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA5/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/Users/peterkaminski/pebble-dev/PebbleSDK-2.0-BETA4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$JAVA_HOME/bin:$ANT_HOME/bin:$LES_SDK”
export PATH




# added by Anaconda 2.2.0 installer
export PATH="/Users/peterkaminski/anaconda/bin:$PATH"

#PATH=“/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:$JAVA_HOME/bin:$ANT_HOME/bin:$LES_SDK”
#export PATH

##
# Your previous /Users/peterkaminski/.bash_profile file was backed up as /Users/peterkaminski/.bash_profile.macports-saved_2015-06-24_at_10:32:22
##

# MacPorts Installer addition on 2015-06-24_at_10:32:22: adding an appropriate PATH variable for use with MacPorts.
# export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/peterkaminski/.bash_profile file was backed up as /Users/peterkaminski/.bash_profile.macports-saved_2015-09-07_at_22:49:58
##

# MacPorts Installer addition on 2015-09-07_at_22:49:58: adding an appropriate PATH variable for use with MacPorts.
#export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.


##
# Your previous /Users/peterkaminski/.bash_profile file was backed up as /Users/peterkaminski/.bash_profile.macports-saved_2015-09-24_at_23:53:49
##

# MacPorts Installer addition on 2015-09-24_at_23:53:49: adding an appropriate PATH variable for use with MacPorts.
#export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# Finished adapting your PATH environment variable for use with MacPorts.

我该如何修改路径以使其恢复到默认状态?或者您是否注意到任何明显的错误?我不确定添加“和 bin:?? 会导致什么。

相关内容