minainCA

Q: Photos library repair was executed unsuccessfully. I get a pop-up that says "library cannot be opened".

I was in the process of trying to create a copy of the photo library to a new external hard drive when I got "error message 36".  This is what prompted me to repair the library.  Now whenever i launch the photos app the screen says "repair Library". i click "repair" and then i get "library cannot be opened".  what is going on?

iMac, OS X Yosemite (10.10.5)

Posted on Feb 20, 2016 9:37 PM

Close

Q: Photos library repair was executed unsuccessfully. I get a pop-up that says "library cannot be opened".

  • All replies
  • Helpful answers

  • by LarryHN,

    LarryHN LarryHN Feb 20, 2016 9:44 PM in response to minainCA
    Level 10 (84,752 points)
    Photos for Mac
    Feb 20, 2016 9:44 PM in response to minainCA

    what format is the External drive adn how is it connected

     

    The Photos library can only be on a volume formatted Mac OS extended (journaled(

     

    LN

  • by minainCA,

    minainCA minainCA Feb 20, 2016 9:47 PM in response to LarryHN
    Level 1 (0 points)
    Feb 20, 2016 9:47 PM in response to LarryHN

    it is formatted Mac OS extended (journaled). it is connected via USB.  it's a Toshiba 2TB USB 3.0.

  • by léonie,

    léonie léonie Feb 20, 2016 11:25 PM in response to minainCA
    Level 10 (107,185 points)
    iCloud
    Feb 20, 2016 11:25 PM in response to minainCA
    Now whenever i launch the photos app the screen says "repair Library". i click "repair" and then i get "library cannot be opened".  what is going on?

    Is Photos using the original library on the internal drive, when you are getting this error message or the copy on the external drive?

     

    First make sure, if the original on the internal drive is still working.

  • by minainCA,

    minainCA minainCA Feb 20, 2016 11:48 PM in response to léonie
    Level 1 (0 points)
    Feb 20, 2016 11:48 PM in response to léonie

    Using the original. I never got to successfully creating a copy of the photo library to the external Because of that error message 36, which is why I'm at this current state. Fixing error 36 required Repair of library.

  • by léonie,

    léonie léonie Feb 21, 2016 12:44 AM in response to minainCA
    Level 10 (107,185 points)
    iCloud
    Feb 21, 2016 12:44 AM in response to minainCA

    "error code -36" is an I/O error.

    I have seen it at these occasions:

    • Hardware problems: When either the source drive or the destination drive are starting to fail.  When you are seeing this error, back up your drive asap, to be on the safe side, as long as you can still read it and check the drive with disk utility. Don't erase any older backup you have, when creating the new backup-
    • Wrong file system: When one of the drives is not formatted MacOS Extended (Journaled), or one drive is formatted case sensitive and the other not,there may be files that cannot be written with the original filename. For example files with ethnic characters in the name can cause problems when writing them to a drive, that is not formatted correctly (see: Use locally mounted Mac OS X Extended volumes for your Aperture library, iPhoto: Sharing libraries among multiple users)
    • Library corruption and permission problems: Set the "ignore Ownership on this volume" flag for your external drive.
    • You can change the permissions for all photos at once in the Finder.

      • Select the enclosing folder of your Photos Library in the Finder and use the command "File > Get Info".
      • In the Info panel click the disclosure triangle beside "Sharing and permissions".  Click the padlock icon too unlock it with your admin password.
      • Now check, if the permissions are set correctly and change them to give yourself read&write permissions.
      • Then click the gears icon at the bottom to open the Actions menu and click "Apply to enclosed items".
      • This will set the permissions for all items in the subfolders to the same permissions.

    • Screen Shot.png

    • If the Library cannot be read, and the file system on the destination drive is correct, but you can still not copy, one of the files inside may be corrupted and cannot be read. Then try to copy the library in parts. This way, you are able to identify the culprit that is causing the I/O error and can skip it, when copying:

     

      • Create a new folder on your external drive. Call it "Photos Library Copy".
      • Ctrl-click (or right-click) your current Photos Library and use the command "Show Package Contents". This will open a folder, showing you the files and folders inside your Photos Library.
      • Copy these folders one-by-one to to the new folder on your external drive.  If one of these folders is giving an error -36, check how far the copying proceeded. The files, that have been copied, are o.k. The file or folder, that should have been copied next will be the unreadable  file. Probably the problem is caused by one of the files in "Masters" or a database folder. In that case look into the Masters folder and copy as much as you can, while leaving out the file that will not copy.

     

    When you are done, rename the copy of your Photos Library to "Photos Library Copy.photoslibrary"  and double click it to open it in Photos. Can Photose open this library?

  • by minainCA,

    minainCA minainCA Feb 23, 2016 5:12 PM in response to léonie
    Level 1 (0 points)
    Feb 23, 2016 5:12 PM in response to léonie

    Hardware problems: already saved a back up

    File System: i am sure i formatted to MacOS Extended (Journaled). i even did it again.

    Library corruption and permission problems: Set the "ignore Ownership on this volume" flag for your external drive. HOW DO I DO THIS?

    Permissions: I have read & write permissions on the old & the new photos library folder.

    If the Library cannot be read, and the file system on the destination drive is correct, but you can still not copy: I followed the instructions and copied items file by file from the original Photos Library (never got a pop up indicating a corrupt file) then gave it the file extension you showed but Photos did not open this new library. 

  • by léonie,

    léonie léonie Feb 24, 2016 9:12 AM in response to minainCA
    Level 10 (107,185 points)
    iCloud
    Feb 24, 2016 9:12 AM in response to minainCA

    Library corruption and permission problems: Set the "ignore Ownership on this volume" flag for your external drive. HOW DO I DO THIS?

    Select the icon of your external drive in the Finder. Open the Info panel by entering the key combination ⌘I or using the command "File > Get Info" from the Finder main menu bar.

    In the Info panel open the "Sharing  & Permissions" section.

    Screen Shot 2015-11-14 at 08.10.04GMT.png

     

    If the option is not available, your external drive has software installed, that is preventing this option, for example backup software.

     

    but Photos did not open this new library.

    Is there any error message?

  • by minainCA,

    minainCA minainCA Feb 26, 2016 10:20 PM in response to léonie
    Level 1 (0 points)
    Feb 26, 2016 10:20 PM in response to léonie

    RE: BACK UP SOFTWARE  - I had backed up my imac to this external drive before doing any of this photos library copying so this must be preventing the option because it isn't there.

     

    When I double click on my new photos library that's on the ext drive, Photos opens to a page that says "Repair LIbrary: The library "Photos Library Copy.photoslibrary" has inconsistencies that must be repaired." then has a repair button.

     

    I'm going to click on it to see if it'll repair that new library.  I had been afraid to do this before.  ok....let's see....OMG it worked! it appears that all the photos are there.  THANK YOU FOR YOUR HELP.

     

    When is it safe for me to delete the photos from the imac now that the file in the ext. drive is working?  when i I download photos will they automatically go to my hard drive now?

  • by léonie,

    léonie léonie Feb 27, 2016 2:02 AM in response to minainCA
    Level 10 (107,185 points)
    iCloud
    Feb 27, 2016 2:02 AM in response to minainCA


    When is it safe for me to delete the photos from the imac now that the file in the ext. drive is working? 

    Test a bit, before you delete the copy on your internal drive.

    At least quit Photos, eject the external drive, restart the mac, connect the external drive again, then launch Photos and see, if it now will find the library on the external drive automatically.

    Does Photos find the external library again after restarting the Mac?

     

    when i I download photos will they automatically go to my hard drive now?

    Yes, they will, if you use Photos to download the photos and if if Photos is using the library on the external drive as the Photos Library.  You can see the path to the library that Photos is currently using in the Photos > Preferences > General panel.

     

    I would rename the library on your external drive, so you can tell from the filename you are seeing in the Info panel, which library is currently open.

     

    While Photos is running, select the Photos album in the sidebar and enter the key combination ⌘I  to open the Info panel.  Theta of the Info panel will show the filename of your current Photos Library.  before you download anything to Photos have a look, which library you are currently having open.

     

    Screen Shot 2016-02-27 at 10.59.06GMT.png

  • by minainCA,

    minainCA minainCA Mar 19, 2016 9:21 PM in response to léonie
    Level 1 (0 points)
    Mar 19, 2016 9:21 PM in response to léonie

    Thank you for helping me through this.  All is well!!