【发布时间】:2010-12-24 00:23:02
【问题描述】:
当我跑步时:
bash http://bit.ly/rvm-install-system-wide )
我收到以下错误:
请确保安装了 git 并且 在 PATH 中可用以继续。
Git 已安装:
*** LOCAL GEMS ***
abstract (1.0.0)
actionmailer (3.0.3)
actionpack (3.0.3)
activemodel (3.0.3)
activerecord (3.0.3)
activeresource (3.0.3)
activesupport (3.0.3)
arel (2.0.6)
builder (2.1.2)
bundler (1.0.7)
erubis (2.6.6)
git (1.2.5)
i18n (0.5.0)
mail (2.2.12)
mime-types (1.16)
minitest (1.6.0)
polyglot (0.3.1)
rack (1.2.1)
rack-mount (0.6.13)
rack-test (0.5.6)
rails (3.0.3)
railties (3.0.3)
rake (0.8.7)
rdoc (2.5.8)
RedCloth (4.2.3)
ruby-oci8 (2.0.4)
rvm (1.1.6)
thor (0.14.6)
treetop (1.4.9)
tzinfo (0.3.23)
【问题讨论】:
-
当您在命令行中键入
git时会发生什么?还是which git? -
[root@essnixapps01 ~]# git -bash: git: command not found [root@essnixapps01 ~]# which git /usr/bin/which: no git in (/usr/kerberos/sbin :/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin)
-
所以路径有问题?如何解决这个问题?
-
locate git是否返回任何内容?如果没有,您将需要安装该工具。如果是这样,那么您可以通过运行PATH="/path/to/git:$PATH"来编辑路径,或者将该行放在主目录中的.bashrc中。