diff --git a/Library/Homebrew/cmd/doctor.rb b/Library/Homebrew/cmd/doctor.rb index 3bd5d4d980f7334525b8aafad2a24c54d64c3d9f..94304b3723d6bdd0090619160c50934cfccdf88f 100644 --- a/Library/Homebrew/cmd/doctor.rb +++ b/Library/Homebrew/cmd/doctor.rb @@ -312,6 +312,20 @@ def check_for_stray_developer_directory end end +def check_for_bad_install_name_tool + return if MacOS.version < 10.9 + + libs = `otool -L /usr/bin/install_name_tool` + unless libs.include? "/usr/lib/libxcselect.dylib" then <<-EOS.undent + You have an outdated version of /usr/bin/install_name_tool installed. + This will cause binary package installations to fail. + This can happen if you install osx-gcc-installer or RailsInstaller. + To restore it, you must reinstall OS X or restore the binary from + the OS packages. + EOS + end +end + def __check_subdir_access base target = HOMEBREW_PREFIX+base return unless target.exist? diff --git a/Library/Homebrew/cmd/install.rb b/Library/Homebrew/cmd/install.rb index cf652b17a1d1c6ab642cc55510440e9ec521135d..55385154d58403efb18423db92c43a26bec249d4 100644 --- a/Library/Homebrew/cmd/install.rb +++ b/Library/Homebrew/cmd/install.rb @@ -55,6 +55,7 @@ module Homebrew extend self check_for_installed_developer_tools check_xcode_license_approved check_for_osx_gcc_installer + check_for_bad_install_name_tool ].each do |check| out = checks.send(check) opoo out unless out.nil?