libiconv.2.dylib Mac OS X Problem

10,148

You appear to have a mismatch between architectures. The system library libiconv should be a universal file that contains all necessary archs; on OS X 10.6, Apple ships it with three.

$ file /usr/lib/libiconv.2.dylib 
/usr/lib/libiconv.2.dylib: Mach-O universal binary with 3 architectures
/usr/lib/libiconv.2.dylib (for architecture x86_64):    Mach-O 64-bit dynamically linked shared library x86_64
/usr/lib/libiconv.2.dylib (for architecture i386):  Mach-O dynamically linked shared library i386
/usr/lib/libiconv.2.dylib (for architecture ppc7400):   Mach-O dynamically linked shared library ppc

Try something similar for the MacVim.app executable:

$ file /Applications/MacVim.app/Contents/MacOS/Vim

There needs to be at least one common architecture and the app needs to be running in one of those common archs. Make sure you have a current version of the app. If the libiconv does not have all of those architectures, your system installation of OS X 10.6 is faulty. Perhaps you tried to install something into /usr/lib? Don't do that. If so, you may need to carefully reinstall OS X 10.6.

Share:
10,148
Sebastian Müller
Author by

Sebastian Müller

Updated on June 14, 2022

Comments

  • Sebastian Müller
    Sebastian Müller almost 2 years

    I have a problem with the important file libiconv.2.dylib. When I want to start some applications (like macvim, etc.) i get this error:

     dyld: Library not loaded: /usr/lib/libiconv.2.dylib
      Referenced from: /Applications/MacVim.app/Contents/MacOS/Vim
      Reason: no suitable image found.  Did find:
        /usr/lib/libiconv.2.dylib: mach-o, but wrong architecture
        /usr/lib/libiconv.2.dylib: mach-o, but wrong architecture
    Trace/BPT trap
    

    Is there any way to restore (no time machine available) or recompile this library for Mac (10.6)?