i have the same problem. i tried loading an iPhoto library (perfectly functional, saved as backup by time machine and restored by time machine). not only did iPhoto NOT load said library, it also does not work anymore: it keeps on trying to repair library and, after failing to do so, shuts down.
i tried repairing permissions with disk utility, with no success (as all other proposed solutions here did NOT work either). maybe it is because i am using SLOW LEOPARD, which seems to be one of the apple's windows millenium editions (rag on vista, which is REAL BAD, but sLow leopard is way worse).
as a mac, linux, android, chrome and windows OS's user, i have to say that apple's Unices are the most expensive systems with the least intuitive interfaces that i have ever seen (and i have been around OS's since before DOS).
the whole concept of needing to repair permissions and delete preference folders is ludicrous: the result of lousy design and terrible execution. add to that secret hermetic "OPTION+COMMAND at startup" or "load while looking to Mecca and standing on your head and pressing OPTION with your nose" suggestions...
i am very, very frustrated every time that i have to fix my mac machines. unfortunately, some of my designers belong to the Church of Jobs and refuse to work with better machines and more stable OS's.