This repository has been archived by the owner. It is now read-only.

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

Closed
micooz opened this Issue Sep 17, 2015 · 13 comments

Comments

Projects
None yet
9 participants
@micooz
Copy link

micooz commented Sep 17, 2015

I've just upgraded my Xcode as well as Command Line Tools for Xcode to 7.0, and then homebrew encountered an Error problem:

$ brew update && brew upgrade

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

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

I re-run the brew upgrade as root via sudo, but it seems not work:

$ sudo brew upgrade

Password:
Error: Cowardly refusing to sudo brew upgrade
You can use brew with sudo, but only if the brew executable is owned by root.
However, this is both not recommended and completely unsupported so do so at
your own risk.

I checked the problem with brew doctor, it gived me the same error as sudo command.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Sep 17, 2015

Run sudo xcodebuild -license to agree to the Xcode license.

@DomT4

This comment has been minimized.

Copy link
Contributor

DomT4 commented Sep 21, 2015

Closing per the above. Let us know if you run into any further issues, Thanks!

@DomT4 DomT4 closed this Sep 21, 2015

@nevik

This comment has been minimized.

Copy link

nevik commented Sep 28, 2015

If there's some reasonable way you can detect this specific problem (e.g. exit code?), it'd be awesome if you could add a hint to brew's output to run the xcodebuild command -- since the warning printed by otool/xcodebuild (without root) is quite misleading in the homebrew context.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Oct 13, 2015

@nevik Agreed. Have added to my todo list to investigate the error codes.

@nevik

This comment has been minimized.

Copy link

nevik commented Oct 13, 2015

👍

@DomT4

This comment has been minimized.

Copy link
Contributor

DomT4 commented Oct 13, 2015

@MikeMcQuaid Could we not repurpose the code from the installer and stick it in brew.rb so you can't run Homebrew until you've agreed to the license?

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Oct 13, 2015

@DomT4 That'd work, yeh.

@JohNan

This comment has been minimized.

Copy link

JohNan commented Oct 23, 2015

If the proposed solution gives this error: xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
you can run the following command instead to get the license agreement popup: xcode-select --install

@kathyonu

This comment has been minimized.

Copy link

kathyonu commented Nov 21, 2015

Thank you for posting, and solving Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool
Using $ xcode-select --install solved my problem 👍

@yeelan0319

This comment has been minimized.

Copy link

yeelan0319 commented Feb 17, 2016

Thank you for posting, I had exactly the same problem. Just additional to the above information, if your sudo xcodebuild -license doesn't work out like me, try upgrade your xcode first and then try this again.
This helped me solve my problem upgrade my homebrew as well as install my ruby-gem.

@roddi

This comment has been minimized.

Copy link

roddi commented Jun 13, 2016

Please reopen. I think brew should give a meaningful error message in this case.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

MikeMcQuaid commented Jun 13, 2016

@roddi We aren't reopening issues on this repository.

@johnnychq

This comment has been minimized.

Copy link

johnnychq commented Jun 23, 2016

I tried

  • sudo xcodebuild -license
  • xcode-select --install

But, not work.

@Homebrew Homebrew locked and limited conversation to collaborators Jun 23, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.