我刚刚被介绍给Rails,并按照指示安装"homebrew“(使用Mac 10.11.3)。我试着通过复制粘贴安装代码行的方式安装Homebrew,但是不知怎么的,我收到了一条“失败的”消息(这是我第一次尝试安装)。
我不知道,所以我再次输入了代码行,下面是出现的情况(第二次,我得到了“文件存在”和“失败期间”):
==> Downloading and installing Homebrew...
remote: Counting objects: 54, done.
remote: Compressing objects: 100% (20/20), done.
remote: Total 54 (delta 45), reused 40 (delta 33), pack-reused 0
Unpacking objects: 100% (54/54), done.
error: cannot lock ref 'refs/remotes/origin/master': Unable to
create '/usr/local/Homebrew/.git/refs/remotes/origin/master.lock':
File exists.
If no other git process is currently running, this probably means a
git process crashed in this repository earlier. Make sure no other git
process is running and remove the file manually to continue.
From https://github.com/Homebrew/brew
! [new branch] master -> origin/master (unable to update
local ref)
Failed during: git fetch origin master:refs/remotes/origin/master --
tags --force --depth=1我对发展完全陌生,不知道该怎么做。有人有小费吗?
发布于 2016-12-07 05:31:27
删除此文件
/usr/local/Homebrew/.git/refs/remotes/origin/master.lock
试一试
rm -f /usr/local/Homebrew/.git/refs/remotes/origin/master.lock然后再试
https://stackoverflow.com/questions/41010011
复制相似问题