Steve,
I am also having trouble under OS X Lion 10.7, and I keep getting the same database error. I followed the terminal directions above and every command worked except invalid path for the last delete command.
Then, I removed the preferences and library folder as you stated, uninstalled and emptied trash, enabled root user via directory utility, logged out and back in as root, reinstalled again and same database error. Tried it twice now 🙁
Did you use the terminal commands above?
Carl