2013-02-05 288 views
3

我試圖安裝Homebrew,但我遇到了一些問題。我列出了下面的結果。我該如何解決這個問題?在OS X上安裝Homebrew時出錯

$ ~ $ brew install wget 
==> Downloading http://ftpmirror.gnu.org/wget/wget-1.14.tar.gz 
Already downloaded: /Library/Caches/Homebrew/wget-1.14.tar.gz 
==> ./configure --prefix=/usr/local/Cellar/wget/1.14 --sysconfdir=/usr/local/etc --with-ssl=openssl --disable-iri 
checking whether make sets $(MAKE)... ./configure: /usr/local/Library/ENV/4.3/sed:/bin/bash^M: bad interpreter: No such file or directory 
no 
configure: error: cannot run /bin/sh build-aux/config.sub 
./configure: /usr/local/Library/ENV/4.3/sed: /bin/bash^M: bad interpreter: No such file or directory 
./configure: /usr/local/Library/ENV/4.3/sed: /bin/bash^M: bad interpreter: No such file or directory 

READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting 

注:我先卸載的MacPorts和brew doctor工作順利。

已解決:我在Homebrew wiki page上找到了替代安裝方法(「Untar anywhere」)。

我跑:mkdir homebrew && curl -L https://github.com/mxcl/homebrew/tarball/master | tar xz --strip 1 -C homebrew

+0

可能是一個紅色的鯡魚:但檢查公式文件:它提到了一個配置錯誤,可能發生取決於你的awk安裝。 – andrewdotnich

回答

3

/bin/bash^M是您的線索。出於某種原因,在下載的內容中有一個DOS行結束字符。這可能是公式中的錯誤,但如果您冒險,則可以brew install dos2unix,然後在相關文件夾上運行dos2unix

+0

讓它工作!謝謝。 – Henry

+0

我很高興:)也許對於後人,你可以編輯你的問題,說你做了什麼來得到它的工作? – andrewdotnich

+0

已更新。我沒有去嘗試你的方法,但最終解決了它。謝謝你的幫助 :) – Henry

1

您使用的是Windows風格的結束行的Unix/Linux/Mac的OS   X.  如果你之前修改您的Git core.autocrlf屬性,然後嘗試:

git config --global core.autocrlf input 

然後重新安裝自制軟件。