Moved libSystem.B.dylib recovery

Alec Jacobson

December 27, 2015

weblog/

I recently, foolishly moved the libSystem.B.dylib file to a temporary location libSystem.B.dylib.off.

This immediately brought my mac to a useless state. Simple commands like ls, mv and renaming files in Finder.app stopped working.

I fixed the problem by using another mac to download the mac os x installer. Go to the App Store and select the most recent OS to download. Once it does you can quit the installer and find /Applications/Install\ OS\ X\ El\ Capitan.app. Then from the command line you can issue something like:

sudo /Applications/Install\ OS\ X\ El\ Capitan.app/Contents/Resources/createinstallmedia --volume /Volumes/MyVolume --applicationpath /Applications/Install\ OS\ X\ El\ Capitan.app

Change /Volumes/MyVolume to the location of a usb drive. This will erase the contents of the thumb drive.

Back on the broken mac I restarted holding option and selected to boot from the usb. This was a bit slow but eventually started up and from the utilities at the top I could select Terminal. From there I could re-instate my libSystem.B.dylib.