9

Everytime I try to use install_name_tool on my machine it reports the following

install_name_tool: object: Abacate malformed object (unknown load command 4)

I read that it could be an error when building the binary. In order to check I create the simplest hello world c++ program and try to change something using install_name_tool. Didn't work. What Am I doing wrong?

Currently I have XCode 4.2 running Snow Leopard OS.

LeoNerd
  • 8,344
  • 1
  • 29
  • 36
McLeary
  • 1,231
  • 2
  • 13
  • 21
  • I suspect you're running an old version of `install_name_tool` left over from a previous install of Xcode. Did you install the Unix Developer Tools when you installed Xcode 4.2? What does `type -a install_name_tool` show? – Ken Thomases Apr 30 '12 at 23:39
  • Is there a way to check if I installed developer tools with XCode 4.2? `type -a install_name_tool` just give the install location `install_name_tool is /usr/bin/install_name_tool` – McLeary May 01 '12 at 00:12
  • I would recommend that you repeat the installation of Xcode 4.2 and make sure to install the Unix Developer Tools. You can also try `pkgutil --file-info /usr/bin/install_name_tool` to see what that says. – Ken Thomases May 01 '12 at 00:21
  • 1
    @KenThomases, you're right. `pkgutil --fine-info /usr/bin/install_name_tool` report among other things `com.apple.pkg.update.devtools.3.2.6.XcodeUpdateUNIXDevSupport`. I'll try to upgrade Unix Developer Tools. – McLeary May 01 '12 at 16:08
  • 1
    Another thing to be aware of (and that I just fell over) is that MacPorts has its own version of `install_name_tool` provided by the package `cctools`. Theoretically, it's just a rebuilt version of the standard cctools, but no, it seems to be broken. – Jashank Jeremy Dec 16 '12 at 20:07
  • In my case it was the old `install_name_tool` from MacPorts that interfered. Removing with `sudo rm -rf /opt/local/bin/install_name_tool` and relying on the one from Command Line Tools, succeeded. – Ain Tohvri Jan 11 '19 at 20:04

2 Answers2

11

Apparently install_name_tool is not updated when XCode is updated. You need to install the Command Line Tools from XCode Preferences. See also install_name_tool on OS X Lion. This resolved the same error for me.

Community
  • 1
  • 1
Maarten O.
  • 138
  • 2
  • 8
  • 2
    I get this error and yet I have installed the updated commandLine Tools – eastafri Oct 10 '13 at 14:32
  • 3
    I observed this too on Mavericks. I had to manually replace the one in /usr/bin with the one from /Applications/Xcode.app/Contents//Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin – Vishal May 19 '14 at 06:53
1

Managed to make it work with Mac OS 10.9.3

https://github.com/Homebrew/homebrew/issues/26544

$$:~ otool -L /usr/bin/install_name_tool

/usr/bin/install_name_tool: /usr/lib/libxcselect.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)

$$:~ pkgutil --file-info /usr/bin/install_name_tool

volume: / path: /usr/bin/install_name_tool pkgid: com.apple.pkg.Essentials pkg-version: 10.9.0.1.1.1306847324 install-time: 1390577801 uid: 0 gid: 0 mode: 755

No more errors on wget:

$$:~ wget dyld: Library not loaded:

@@HOMEBREW_PREFIX@@/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /usr/local/bin/wget Reason: image not found

trigas
  • 31
  • 2