mac os needs to repair your library to run applications

A few weeks back, I was using my computer over the weekend. When I was done I did what I always do, I locked the screen and went to bed. When I came back and authenticated I was presented with the following pop-up

mac os needs to repair your library to run applications

What would ensure is another example of trial and error due to missing log messages. Read on to learn more!

As I mentioned, one morning I was presented with a message on my laptop. After authenticating like it had asked the message popped up again. I did this dozens of times before I realized that it was not going to go away. Given it took priority on my screen and I had no way of navigating anywhere else, I finally decided to hard reboot. When I logged back in, I was presented with what appeared to be a fresh install of mac os — the desktop was not the customized one I had created. In addition, the pop up message greeted me again — this was going to be fun.

Now I know what you must be thinking — it was something I installed or some change I made to the system. The thing was, I had not installed anything and I had not made any changes. The night before I was working on my homelab which required only a terminal window with SSH and a browser. While I would have loved to go check the logs, the pop up prevented me from doing anything on the same. Down the troubleshooting path I went:

  • SMC reset — nope
  • Single user mode — nope
  • Recovery Mode with Disk Utility First Aid — nope

All the normal steps failed me so I decided to go back into Recovery Mode and see what Terminal had to say. I was able to properly navigate my home directory, but to my surprise 95% of my files and directories were owned by root and 5% were owned by “501”, which is my User ID number.

Note: I did check /etc/passwd to double-check it was my User ID number, but did not find the entry — then I realized mac os uses OpenDirectory instead.

Suspecting a permission issue, I was hoping to run the disk repair permissions option in Disk Utility, however I am running mac os Sierra and that feature has been removed. My only alternative was to reinstall mac os — so I did. Unfortunately, this did not fix the issue either — likely because the reinstall intentionally does not mess with existing home directories.

Running out of options, I decided to fix my home directory permissions from the Terminal application in Recovery Mode:

When I rebooted, I was happy to see that my profile was returned and the pop up was gone. I did not have a root cause, but at least my problems were solved — or so I thought. Everything appeared to be working properly, except my Outlook application. In my next post, I will cover the problems I had with Outlook as well as the solution.

© 2017, Steve Flanders. All rights reserved.

6 thoughts on “mac os needs to repair your library to run applications

  1. Carl says:

    Hello and thank you for the post.

    I too had this happen suddenly yesterday evening. I had just moved my account form a one machine to another a few days ago, and all went well. A copy of VNWare Fusion was in the backup that was moved over. My (new) machine had been up and running flawlessly for at least 8 hours yesterday when I started up VMWare Fusion for the first time on this new machine. That is when the messages started popping up (macOS needs to repair your library). I thought that my installed copy of Fusion may have been messed up in the process of the transfer and caused the problem. I had to get ahead of the pop up messages before I could reinstall Fusion.

    I pulled down another copy of macOS 10.12.4 and reinstalled that over my existing installation, hoping this would conquer the pop up messages, but they still kept coming. The new OS install did not help. I found another machine with which I could go on line, and then I found this post of yours.

    My problem though was when I booted into Recovery Mode, the /Users/ folder was absent. I reboot from a USB flash drive. The /Users folder was now visible. I did the chown -R 502 Users/ from there. Things appear to be working fine now. All my apps and Mail is still in place.

    Thanks for your posting.

    Carl

  2. Chad says:

    Great post! This issue has happened on two different Sierra machines for me now, and that terminal command will come in very handy.

Leave a Reply