我刚刚介绍了Ruby on Rails,并按照说明安装“homebrew”(使用Mac El Capitan 10.11.3)。我尝试通过复制从Homebrew网站粘贴安装代码来安装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
我对开发完全陌生,并且不知道如何继续。有人有任何提示吗?
答案 0 :(得分:0)
删除此文件
/usr/local/Homebrew/.git/refs/remotes/origin/master.lock
尝试
rm -f /usr/local/Homebrew/.git/refs/remotes/origin/master.lock
然后再试一次