简体   繁体   English

首次自制安装失败

[英]First time homebrew installation failure

I've just been introduced to Ruby on Rails and am following instructions to install "homebrew" (using a Mac El Capitan 10.11.3). 我刚刚被介绍给Ruby on Rails,并按照说明安装“自制软件”(使用Mac El Capitan 10.11.3)。 I tried installing Homebrew by copy pasting the line of installation code from the homebrew website but somehow got an 'failed during' message (this is the first time I tried installation). 我尝试通过从Homebrew网站复制粘贴安装代码行来尝试安装Homebrew,但不知何故出现了“期间失败”消息(这是我第一次尝试安装)。

I was clueless so I just re-entered the line of code again, here is what comes up (the second time, I get 'file exists' and the 'failed during'): 我一无所知,所以我再次重新输入了这行代码,这是发生的情况(第二次,我得到“文件存在”和“失败期间”):

 ==> 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

I am completely new to development and have no clue how to proceed. 我对开发完全陌生,不知道如何进行。 Does anyone have any tips? 有人有提示吗?

delete this file 删除这个档案

/usr/local/Homebrew/.git/refs/remotes/origin/master.lock

try 尝试

rm -f /usr/local/Homebrew/.git/refs/remotes/origin/master.lock

and then try again 然后再试一次

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM