I have installed OS X Lion and I was trying to resolve error libxml2 missing for Ruby programming purpose. I tried to install latest version of Libxml2 that is libxml2-2.8.0
Because of incompatibility of this version Mac is throwing errors while opening XCode, Chrome and some other application with the error.
Dyld Error Message:
Library not loaded: /usr/lib/libxml2.2.dylib
Referenced from: /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit
Reason: no suitable image found. Did find:
/usr/lib/libxml2.2.dylib: mach-o, but wrong architecture
/usr/local/lib/libxml2.2.dylib: mach-o, but wrong architecture
/usr/lib/libxml2.2.dylib: mach-o, but wrong architecture
What should I do ? How should I remove libxml2 2.8.0 version.?
Please reply
Best Answer
You can do either of
remove
/usr/local/lib/libxml2.2.dylib
, copy a workinglibxml2.2.dylib
from another Mac with the same OS X version and recreate the symlinks to look like the directory listing belowreinstall OS X Lion on top of the existing installation and reapplying all the system updates.
get
libxml2.2.dylib
from your backup and apply option 1PS: I managed to do the same thing with one of the more essential libraries a few months ago, leaving only option 2 (because nothing useful worked anymore). With hindsight I probably could have booted from DVD to apply option 1, but I would still have needed a trusted source for the library because the DVD was for 10.7.0.