terminal - Homebrew 安装时出现问题

标签 terminal homebrew osx-yosemite failed-installation

我正在尝试在全新安装的 OS X Yosemite 上安装 Homebrew(使用磁盘实用程序删除旧分区并进行完整的重新安装,没有任何介质,大约 10 分钟前完成)。

不幸的是,自从我第一次尝试使用以下命令安装以来,我已经关闭了终端:

“ruby -e“$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)”,

因此我没有原始的错误代码。我使用了上面提供的安装命令,并被引导安装命令行工具。这部分表现得很好。安装命令行工具后,我按指示点击“返回”,它开始“安装 Homebrew 程序”。 安装似乎停止了,然后显示了一条错误消息。

然后我通过简单地重新运行相同的终端提示符来重新尝试安装,终端给了我以下消息:

“同意 Xcode/iOS 许可证需要管理员权限,请通过 sudo 以 root 身份重新运行。”,

然后这表明安装成功。 但是,然后系统提示我运行brew doctor,然后我运行了它,随后收到警告:

“同意 Xcode/iOS 许可证需要管理员权限,请通过 sudo 以 root 身份重新运行。

错误:执行时失败:/usr/bin/otool -L/usr/bin/install_name_tool"。

然后我使用提示“brew help”来查看它是否可以工作并且确实可以工作,但再次尝试使用brew doctor产生:“同意Xcode/iOS许可证需要管理员权限,请通过root身份重新运行须藤。

错误:执行时失败:/usr/bin/otool -L/usr/bin/install_name_tool"。

然后我尝试使用 https://gist.github.com/mxcl/1173223 中的行卸载 Homebrew。终端显示成功消息。然后我退出终端,重新打开它并输入brew,我得到了一个选项目录,我认为brew没有像我想象的那样安装。

所以,我不知道我安装的 Homebrew 出了什么问题,也不知道是否有人可以教育我,这会有帮助。我还希望获得有关如何成功卸载然后重新安装 Homebrew 的信息。

谢谢

最佳答案

我刚刚遇到了同样的问题(使用 Yosemite),并带有相同的错误消息。我是这方面的新手,所以我可能正在做,但我尝试的似乎有效。我认为这不是安装错误,但我们只需同意许可证并通过 sudo 运行即可。

这是我采取的步骤。 (有点多余)

首先我做了“sudo brew doctor”

然后它说:

You have not agreed to the Xcode license agreements, please run 'xcodebuild -license' (for user-level acceptance) or 'sudo xcodebuild -license' (for system-wide acceptance) from within a Terminal window to review and agree to the Xcode license agreements.

Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool

所以我做了“xcodebuild -license”

然后它说:

Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo.

所以我做了“sudo xcodebuild -license”

然后它说:

You have not agreed to the Xcode license agreements. You must agree to both license agreements below in order to use Xcode. Hit the Enter key to view the license agreements at '/Applications/Xcode.app/Contents/Resources/English.lproj/License.rtf'

然后我按下 Enter 键并签订 MAC SDK 和 Xcode 协议(protocol)。 您必须读到最后才能真正同意这一点。所以我不断地敲击空间来展示整个 Agreenent。 最后说

By typing 'agree' you are agreeing to the terms of the software license agreements. Type 'print' to print them or anything else to cancel, [agree, print, cancel]

然后我输入“同意”和“brew doctor”,它说

Your system is ready to brew.

希望这会有所帮助!

关于terminal - Homebrew 安装时出现问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27499434/

相关文章:

ios - 如何更改 mac 终端查找特定程序的位置?

python - 在 Python 3.8 上安装 Matplotlib 时出错

mongodb - 套接字异常 : Address already in use MONGODB

c++ - OSX 上不兼容的 openCV 和 libtiff 库

python - IntelliJ如何更改PYTHONPATH

java - 优胜美地 10.10.2 和 Java

python - OSX : Setting Enthought python path in . bash_profile 导致奇怪的终端行为

javascript - Express 和 SimpleHTTPServer 有什么区别

升级 Mac OS X Yosemite (Mac OS 10.10) 后 Mysql 无法启动

qt - 无法更改自定义QListView行的突出显示的文本颜色