3

我正在尝试安装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 页面上找到的另一种安装方法(“在任何地方解压缩”)解决了问题。

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

4

2 回答 2

3

/bin/bash^M是你的线索。出于某种原因,正在下载的内容中有一个 DOS 行尾字符。这可能是公式中的一个错误,但如果您喜欢冒险,您可以brew install dos2unix然后dos2unix在有问题的文件夹上运行。

于 2013-02-05T06:36:40.317 回答
1

您在 Unix/Linux/Mac OS X 中使用 Windows 样式的行尾。如果您之前修改了 Git core.autocrlf 属性,请尝试:

git config --global core.autocrlf input

然后重新安装 Homebrew。

于 2014-02-21T07:09:28.757 回答