簡體   English   中英

首次自制安裝失敗

[英]First time homebrew installation failure

我剛剛被介紹給Ruby on Rails,並按照說明安裝“自制軟件”(使用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

我對開發完全陌生,不知道如何進行。 有人有提示嗎?

刪除這個檔案

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

嘗試

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

然后再試一次

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM