0

I installed ruby via \curl -L https://get.rvm.io | bash -s stable and did rvm install 1.9.2 doing this creates and error

Installing requirements for osx, might require sudo password.
fatal: Unable to create '/usr/local/.git/index.lock': Permission denied
Error: Failure while executing: git checkout -q master 
Failed to update Homebrew, follow instructions here:
https://github.com/mxcl/homebrew/wiki/Common-Issues and make sure `brew update` works before continuing.

Upon doing a which git it shows it's installed in /usr/bin/git yeah homebrew keeps trying to reference /usr/local/.git. I tried unistalling homebrew so I can do a fresh install using what's listed at homebrew gist. All seemed well but doing a which brew still shows it as /usr/local/bin/brew so I tried to manually uninstall it by doing it one by one.

One thing to note is I never had a Cellar folder, why I don't know. While doing a brew prune I noticed a lot of macport items are starting to ask if I should override them.

Is it typical to of ran the uninstall script but still have the brew commands available or the dirs?

Why is it that homebrew needs root access to /user/local/ to work, this is extremely bad.

4

2 回答 2

0

最后只是做了一个sudo $USER,因为我真的找不到任何其他方法来解决这个问题。

于 2013-05-01T00:05:52.633 回答
0

/usr/local/.git引用的不是git可执行文件,而是它试图在/usr/local/. 它正在尝试写入该文件。

/usr/local要运行自制软件,您需要以您将要运行的用户身份写入权限brew。Homebrew 推荐的方法是调整 /usr/local 上的所有权和权限,以允许您从常规用户帐户或专用 Homebrew 帐户写入它,而不是使用sudo. 这是作为自制安装脚本的一部分完成的,通常是通过将您放入admin组中并使/usr/local组可写。

要解决此问题,请检查所有者和权限,/usr/local//usr/local/.git确保您可以以/usr/local/您正在运行的用户brewRVM命令的身份向他们(以及层次结构的其余部分)写入数据。

于 2013-05-01T01:31:15.483 回答