执行失败:/usr/bin/otool -L /usr/bin/install_name_tool

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

我正在尝试在我的系统上执行 brew 命令。但它一直在抛出同样的失败:

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

The configuration of the brew installed are : 

HOMEBREW_VERSION: 0.9.5
ORIGIN: https://github.com/Homebrew/homebrew
HEAD: ef01d1d92e8f57da8f75d3fb70c934f29ef875d8
Last commit: 2 hours ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_REPOSITORY: /usr/local
HOMEBREW_CELLAR: /usr/local/Cellar
HOMEBREW_BOTTLE_DOMAIN: https://homebrew.bintray.com
CPU: quad-core 64-bit haswell
OS X: 10.10.5-x86_64
Xcode: 7.1
CLT: 7.1.0.0.1.1444952191
clang: error: unable to find utility "clang", not a developer tool or in PATH
Clang: N/A
X11: 2.7.7 => /opt/X11
System Ruby: 2.0.0-p481
Perl: /usr/bin/perl
Python: N/A
Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
Java: 1.8.0_65

我有类似的错误,因为我忽略了接受Xcode许可协议。不确定您是否遇到同样的问题。您可以 运行 下面的命令来接受它,然后重试您的 brew 命令:

sudo xcodebuild -license

在某些网站上阅读此内容。这与您想在 Mac OSX 上开发的 Python 版本无关。它还应该有一个 Python 2.7 预配置系统 OS。我最终从我的框架中删除了旧版本并指向 bash_profilePATH 的最新版本。

因此,为了解决此问题,您需要确保 Python Ver 2.7Frameworks 中可用。 Do Not Delete It.