An explosion Tuesday at a nursing home just outside Philadelphia killed at least two people and collapsed part of the building, authorities said.