Skip to Content

How to Fix macOS needs to repair Library to run applications error?

Problem

User no longer has permissions to access home folder and error message “macOS needs to repair your library to run applications” show after upgrade to High Sierra, password doesn’t work to complete that process.

Error Solution 1: Execute Disk Utility First Aid

  1. Go to Utilities > Disk Utility > First Aid tab.
  2. Select Run on the appeared pop-up dialog box.
  3. Restart computer.

Solution 2: Reset permissions

  1. From Finder menu bar, select Go > Home to open your home folder.
  2. Choose File > Get Info to open Info window of your home folder.
  3. Click the triangle shape to open Sharing & Permissions section.
  4. Click the lock and enter an administrator name and password if the Lock button at the bottom of the window shows as closed.
  5. Click the Action menu in the bottom corner of the window and choose Apply to enclosed items.Apply to enclosed items.
  6. Click OK to confirm the action.
  7. Open Terminal app then enter below command:
    chflags -R nouchg ~
    diskutil resetUserPermissions / `id -u`
  8. Quit Terminal and restart computer.

Solution 3: Changes user and/or group Ownership of each file in Library

  1. Login to the affected profile.
  2. Open Terminal app.
  3. Enter below command to get the new user ID:
    id -u
  4. Enter below command to get the new group ID:
    id -g
  5. Enter below command to change ownership:
    sudo chown -R userid:groupid /Users/
    sudo chown -R userid:groupid ~/Library
    sudo chown -R ~/Library
    sudo chgrp -R ~/Library
  6. Reboot computer.

Solution 4: Reset Password Command

  1. Boot your mac into Recovery mode by pressing CMD + R key.
  2. Go to Utilities menu > Terminal to open Terminal app.
  3. Type resetpassword command.
  4. Select Systemdrive.
  5. Select Username from the list.
  6. Click on Reset Home folder Permissions and ACL’s button.
  7. Reboot your Mac.

Note: Sometimes will need to run resetpassword for second time until it works.