dyld: shared cached file was build against a different libSystem.dylib

A couple days ago, every command I execute in a Terminal window begin producing one or more lines saying:

dyld: shared cached file was build against a different libSystem.dylib, ignoring cache

This led to some concern that my machine may have been rootkitted. I looked at /usr/lib/libSystem.dylib. It a symlink to /usr/lib/libSystem.B.dylib and that file's modify date was 2/16/2011, while all the other files in /usr/lib dated back to January 6th, and most back to September of 2010.

Attempting to see if /usr/lib/libSystem.B.dylib had been altered, I examined the same file on a Mac Pro. Apart from the modify date, the files were identical. md5 and sha1 checksums matched for both files.

Rebooting did not fix the problem. Opening a terminal window produced the message four times. Running shell scripts and the like might produce it hundreds of times.

Looking at the message, the English of which is a little fishy (shared cache file "was build"?) I thought, well, what if the file's date was set back to the value the other Mac has, making it not newer than the shared cache. I tried doing a

touch -t 201011060116.03 /usr/lib/libSystem.B.dylib

...to make it match the modify time of the file on the Mac Pro. Instantly, the problem went away. No reboot required.

So what changed on the day the problem started occurring? I installed iWeb. Nothing seemed to go wrong with the install, but, looking for files modified between 2/16 and 2/17, there are a huge number of files in /Applications/iWeb.app, some email messages, and not much else.

It's pretty weird. My workaround seemed to fix it. I posted it here so others may find it. Also if anyone knows why it happened, etc, I'd like to know too.

Macs, Mac OS X (10.6.6)

Posted on Feb 22, 2011 4:35 AM

Reply
2 replies

Feb 22, 2011 5:38 AM in response to karll

See:

http://discussions.apple.com/thread.jspa?messageID=12580486&#12580486

http://discussions.apple.com/thread.jspa?threadID=2145360&tstart=-1



You can request a rebuild of this cache by issuing the command:

*sudo update dyld_sharedcache*

You can also do the following, which will force a rebuild even if the system thinks everything is up to date:

*sudo update dyld_sharedcache -force*

Then reboot.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

dyld: shared cached file was build against a different libSystem.dylib

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.