1

我编辑了/etc/paths,把本地目录放在最上面,现在我不能在终端运行命令,包括sudo,恐怕这会影响终端外的系统。

为了解决这个问题,我已经注释掉了所有内容并获取了 .bash_profile 和 .bashrc,/etc/paths.d/ 下没有任何内容,而 /etc/paths 现在是:

/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/bin

然而问题依然存在:

$ echo $PATH
/Volumes/Macintosh HD/Users/jsmm/.wp-cli/bin:/usr/local/bin:/Volumes/Macintosh HD/Users/jsmm/bin:/Volumes/Macintosh HD/Users/jsmm/.wp-cli/bin:/usr/local/bin:/usr/local/sbin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/mysql/bin:/usr/local/bin:/usr/local/sbin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/mysql/bin:/Volumes/Macintosh:/Volumes/Macintosh:/Volumes/Macintosh HD/Users/jsmm/.wp-cli/bin

和:

$ /usr/libexec/path_helper -s
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/texbin:/Volumes/Macintosh HD/Users/jsmm/.wp-cli/bin:/Volumes/Macintosh HD/Users/jsmm/bin:/usr/local/sbin:/Applications/Postgres.app/Contents/MacOS/bin:/usr/local/mysql/bin:/Volumes/Macintosh"; export PATH;

系统是 Mac OS X 10.8 Mountain Lion。期待您的帮助,

4

0 回答 0