【发布时间】:2012-11-11 10:48:17
【问题描述】:
我在使用git 命令时遇到问题。我收到-bash: git: command not found。
它在我运行$ gem list 时报告为已安装,并且我已将其路径放在我的.profile 上,如下所示。我只是不明白它为什么不起作用。感谢您的帮助
# MacPorts Installer addition on 2012-10-11_at_19:01:44: 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.
export PATH=${PATH}:/usr/local/mysql/bin
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
# git path
export PATH=$PATH:/usr/local/git/bin
【问题讨论】:
-
我把 $PATH 改成了 ${PATH} 还是不行
-
你确定 git 安装在 /usr/local/git/bin 吗?而且您不只需要 PATH 中的 /usr/local/bin 吗?您是否在修改后重新加载了 .profile(source ~/.profile)?
-
我如何首先安装 Git?我的 gem 没有显示安装了任何 git。