On the existence of generalized inverses