Corrupt photos library and problems designating backup as system library

Hello. Today I went to open photos and I got the message "The library could not be opened". I can't think of anything I did to cause a problem. There are no options to repair or anything. I dipped into Time Machine and restored a version from yesterday, which opens fine. When I enter Photos Preferences to select the backup as the system photo library I get the message "The operation couldn’t be completed. (PHPhotosErrorDomain error -1.)". I have tried creating new librarys but I get the same message. I am baffled as to where I go from here, I just want to get icloud photos up and running again.

Thank you in anticipation ... Ian

Mac mini, macOS 12.6

Posted on Aug 19, 2023 03:26 PM

Reply
Question marked as Top-ranking reply

Posted on Aug 21, 2023 02:40 AM

I figured it out. I ran first aid on disk utility and it failed to complete. So I deleted and reformatted the disk. Then I restored the whole drive from time machine rather than just the photos library. Then photos was happy with having the replacement library as the system library and everything is back to normal.

Similar questions

5 replies
Question marked as Top-ranking reply

Aug 21, 2023 02:40 AM in response to ianbraith

I figured it out. I ran first aid on disk utility and it failed to complete. So I deleted and reformatted the disk. Then I restored the whole drive from time machine rather than just the photos library. Then photos was happy with having the replacement library as the system library and everything is back to normal.

Aug 20, 2023 11:06 AM in response to ianbraith

Hello ianbraith,


Are you able to use the Photos Repair Library tool? Here's how you could try to solve this by repairing your Photos Library: How to use the Photos Repair Library tool on your Mac


How to use the Photos Repair Library tool on your Mac

If your Photos library won't open or if the Photos app behaves unexpectedly on your Mac, the Photos Repair Library tool might help.

Before you use the Photos Repair Library tool, back up your photo library. You can use Time Machine, use a third-party backup solution, or copy the library to an external drive. By default, your photo library is stored in the Pictures folder within your home folder.

To get to the Photos Repair Library tool on your Mac, follow these steps: 

1. If Photos is open, close the app. Then, while you click to open Photos, hold down the Command and Option keys at the same time.

2. In the window that opens, click Repair to start the repair process. You might be asked to enter your user account password.

The Repair Library tool analyzes the library's database and repairs any inconsistencies it detects. Depending on the size of your library, the repairs might take some time. When the process is done, Photos opens the library.

If you repair a library that's used with iCloud Photos, iCloud checks the library after the repair process completes to ensure everything is synced correctly.

If these steps don't work or you can't open the repair tool, contact Apple Support.


As mentioned at the bottom of this resource, if you still need help with this, contact Apple Support: Get Support They would need to take it from here.


Take care.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Corrupt photos library and problems designating backup as system library

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.