In hindsight, I guess it makes sense that renaming libc++.1.dylib would cause a lot of stuff to crash since libc++ is a dynamically loaded library. Though I always thought that when a dylib was loaded, it was somehow copied into the resident memory of the application. I guess not.
It does make me wonder though... what IS the correct way to install libc++ if not to replace the file? libc++'s website suggests creating links in /usr/lib but goes on to say "either way to should work" (and then never goes on to say what that other way is..). Hum.
And just to document what I did to fix it:
- Booted into single user mode (held command-s during reboot).
- Saw a diagnostic message saying that stuff crashed because libc++.1.dylib was missing. This is when I realized that renaming libc++.1.dylib did have such catastrophic effects.
- Rebooted into recovery mode (held command-r during reboot).
- cd up several directories until I found "Volumes"
- cd into Volumes/Macintosh\ HD/usr/lib
- renamed the file to libc++.1.dylib (using the 'mv' command).
- Rebooted normally, and prayed that this would fix it
- And it did!