【问题标题】:RVM install system wide Git dependencyRVM 安装系统范围的 Git 依赖项
【发布时间】: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 中。

标签: ruby linux git rvm rhel5


【解决方案1】:

我想git ruby​​gem 与 RVM 安装所需的命令行git DVCS 工具不同。查看http://book.git-scm.com/2_installing_git.html,并在您的系统上安装 git DVCS 工具。然后您会注意到 which git 返回一个有效结果,并且 RVM 安装程序可能会工作。

【讨论】:

  • 我能够安装单用户 RVM 软件包,但不是系统范围的。
【解决方案2】:

你显然有路径问题,因为 git 不在你的路径中。

首先,您是否尝试以 root 身份安装 RVM? 其次,确保安装了 git,而不是 git gem,并将其添加到您的路径中(以 root 身份)

$: export PATH=/path/to/git/directory:$PATH

运行此命令后确保which git 返回/path/to/git/directory/git

最后,您可以尝试重新安装系统范围的 RVM。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-04-08
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-07-02
    相关资源
    最近更新 更多