Beirut - Michel Aoun, the former Lebanese army chief, has been elected president of Lebanon, ending a two-and-a-half-year power vacuum.