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

Issue when using hombrew: "/usr/bin/otool: Bad CPU type in executable" #48104

Closed
ghost opened this issue Jan 15, 2016 · 13 comments
Closed

Issue when using hombrew: "/usr/bin/otool: Bad CPU type in executable" #48104

ghost opened this issue Jan 15, 2016 · 13 comments

Comments

@ghost
Copy link

@ghost ghost commented Jan 15, 2016

After not using home-brew for a while, I wanted to install port audio through brew. I was trying to set up this git hub project that introduces a different kind of soundcloud client.

When I try to run brew install port audio, I get this error:

sh: /usr/bin/otool: Bad CPU type in executable
Error: Failure while executing: /usr/bin/otool -L /usr/bin/install_name_tool

I googled around and found out that some issues occure in combination with Xcode on Mac, especially when you installed an older version of Xcode. One post I found suggested that the problem occurs when you have very old files in your /bin/ folder. The author of the post had tried to install a very old version of Xcode and had files in his /bin/ folder that where dated to 2003. I also tried to install an older version of Xcode in the past and I too found files in my /bin/ folder that are dated to 2003, although I am using a Retina MacBook.

The post suggested that these files interfere with homebrew because it expects a different kind of CPU. This is as far as my knowledge goes and I don't really understand how these files suddenly make homebrew think that I have a different CPU.

I tried to completely deinstall Xcode but the problem still arises. I have since installed the newest version of Xcode which I successfully deleted but I am not sure if I managed all things related to the old version of Xcode that I tried to install. Also the post didn't really explain how to fix the problem, I only understood that the problem is somehow related to these 2003 files.

I tried to delete the files that are dated back to 2003, but that didn't really fix the issue. When I try running something like brew doctornow I get:

error: /Library/Developer/CommandLineTools/usr/bin/otool: can't open file: /usr/bin/install_name_tool > > (No such file or directory)
Error: Failure while executing: /Library/Developer/CommandLineTools/usr/bin/otool -L > /usr/bin/install_name_tool

So I am basically just wondering now what I actually have to do with these files to fix the issue.

Thanks for any help!

@bfontaine

This comment has been minimized.

Copy link
Member

@bfontaine bfontaine commented Jan 15, 2016

Please run brew update then see if brew doctor finds any issue.

@ghost

This comment has been minimized.

Copy link
Author

@ghost ghost commented Jan 15, 2016

I ran brew update and then ran brew doctor and got this:

Warning: A newer Command Line Tools release is available.
Update them from Software Update in the App Store.
Error: Failure while executing: /Library/Developer/CommandLineTools/usr/bin/otool -L > /usr/bin/install_name_tool

After that I tried to run brew install port audioagain and I got the same error of

Error: Failure while executing: /Library/Developer/CommandLineTools/usr/bin/otool -L > /usr/bin/install_name_tool

I guess the update for the new Command Line Tools is necessary? I wasn't able to update them yet due to a slow internet connection.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jan 17, 2016

@Howl3r Yes, it's necessary.

@ghost

This comment has been minimized.

Copy link
Author

@ghost ghost commented Jan 18, 2016

@MikeMcQuaid Thanks for the info. But even after updating up the Command Line Tools I still get this error whenever I run brew doctor or try to install something with homebrew:

Error: Failure while executing: /Library/Developer/CommandLineTools/usr/bin/otool -L > > /usr/bin/install_name_tool

@mistydemeo

This comment has been minimized.

Copy link
Member

@mistydemeo mistydemeo commented Jan 18, 2016

The /usr/bin/install_name_tool is actually a shim which comes with the OS itself; it's not part of the CLT, unfortunately. You'll need to reinstall the OS, or restore that one file from the OS installer.

@ghost

This comment has been minimized.

Copy link
Author

@ghost ghost commented Jan 18, 2016

Oh man, that's unfortunate. Thanks for the info though!

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jan 25, 2016

@Howl3r Any news on this?

@ghost

This comment has been minimized.

Copy link
Author

@ghost ghost commented Jan 25, 2016

@MikeMcQuaid No sorry, I haven't reinstalled the OS yet. I am not comfortable doing it at the moment. Will definitely report back though, once I've done it.

@MikeMcQuaid

This comment has been minimized.

Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Jan 25, 2016

@Howl3r No worries! Closing this out for now but feel free to reopen if your issue persists post-reinstall.

@abbygriffiths

This comment has been minimized.

Copy link

@abbygriffiths abbygriffiths commented Mar 30, 2016

Oh man... I too have this problem. Guess I'll forget about Homebrew then.

@ilovezfs

This comment has been minimized.

Copy link
Contributor

@ilovezfs ilovezfs commented Mar 30, 2016

@abbygriffiths What makes you think you "have this problem"? If you're actually looking for help addressing it, I'm sure it's solvable.

@abbygriffiths

This comment has been minimized.

Copy link

@abbygriffiths abbygriffiths commented Mar 30, 2016

Nevermind. Solved it after digging around for hours. Downloaded the El Capitan official installer from the MAS, and then mounted the EDP Installer from inside it. (From Terminal, cannot be done from Finder). Then ran the Essentials.pkg installer from inside the mounted drive. Waited for 15 minutes. Bingo. Everything working. I had messed up the system by installing a very old version of Xcode that set my /usr/bin files to files from 2003! El Capitan Installer helped save the day. Sorry for the previous hate, Homebrew, you're a life saver to manage dependencies.

@ilovezfs

This comment has been minimized.

Copy link
Contributor

@ilovezfs ilovezfs commented Mar 30, 2016

Sorry for the previous hate, Homebrew, you're a life saver to manage dependencies.

No problem. This stuff can get pretty frustrating sometimes, I know.

Thanks for sharing your solution. @Howl3r Maybe you can apply that to your situation too!

@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.