When launching the App Store and electing to update the operating system, it immediately prompted me to restart the computer since it had previously downloaded the installer (possibly a month ago or more, based on its availability as of June 1, 2018). Having updated macOS many times before, I knew it could take a while to install, so I restarted and came back about an hour later to find a disturbing "macOS could not be installed on your computer" error. It went on to say something about being unable to locate a resource--I pressed command-shift-3 to take a screenshot, but I found out later that the screenshot was not saved (since the Finder was not running), so I don't remember the exact wording. I did successfully save the installer log, but it did not appear to have the same language as what I saw on the screen, which looked similar to, but possibly not exactly like, this screenshot (image grabbed from this site):
In any case, my only option at that point was to restart the computer. Restarting the iMac simply resulted in an infinite loop with the installer generating the "macOS could not be installed on your computer" error minutes later and then prompting me to restart. I noticed that the internet connection was down, so I was hoping that the installer was trying to download something and wasn't able to establish a connection to do so. I rebooted the router and got the internet connection working again, as verified on another device. Still no luck--rebooting kept resulting in the same error and providing no recourse but to restart.
I nearly crapped in my pants.
Did I brick the computer? Would I have to reinstall the operating system from a DVD or flash drive? Worse yet, would I have to service the iMac from a "professional" and drain half the money out of my savings account? Then I decided to reach into my bag of tricks by restarting in safe mode to see if I could bypass the macOS installer. This is done by holding the shift key while restarting. I was able to launch macOS 10.13.4 and get to the Finder. Bingo! From there, I opened the App Store and checked for updates. It said that a software update to 10.13.5 was available. Hooray! I clicked the "update" button and waited anxiously as it downloaded the 2.12 GB installer.
After restarting the machine, the macOS installer seemed to be working correctly, and a little less than an hour later, the machine rebooted into a working installation of macOS High Sierra 10.13.5.
Craptastrophe avoided.
Reflecting on this experience, I have 2 recommendations to share:
- Install OS updates as soon as possible after downloading them. Specifically, in this case I wonder if cleaning up "system junk" with Clean My Mac might have stripped away resources from the mac OS installer which prevented the installer from functioning properly. I can't say for sure that this was the problem, nor will I ever attempt to reproduce the issue, but that's my best guess as to why the macOS installer failed. Downloading and immediately installing a macOS update is probably a safer thing to do in general.
- Learn how to start up your Mac in safe mode. It could save your skin, as it did mine. Even if you can't completely resolve the issue in safe mode, the ability to launch the Finder will at least enable you to grab a copy of important files from your hard drive.
I hope you've benefited from this. Happy macOS updating!