"A solution must be found and it is up to the Lebanese political parties to find a way to compromise," Ayrault said on Monday.
Divisions among Lebanon's Christian, Sunni-Muslim, Shia-Muslim and Druze leaders have prevented decision on a president since May 2014, when Michel Sleiman's mandate expired, and parliament has extended its own mandate twice since 2009.
With 1.1 million refugees from the Syrian war on its soil, the tiny country's institutions are under stress.
Its government is split between a bloc led by the Shia movement Hezbollah, which has sent fighters to support Syrian President Bashar al-Assad, and one led by former prime minister Saad Hariri, of the 14 March movement, which is hostile to Syria.
Speaking to politicians at a banquet at the French embassy, Ayrault said the Syrian conflict "alone cannot justify the absence of a solution to the institutional crisis" in Lebanon.
On a visit to French troops in the southern town of Naqura, Ayrault promised that France would maintain its contribution to the Unifl force.
France has 850 soldiers in the 10,000-strong force, which monitors the border with Israel and about 150 French soldiers have been killed in Lebanon since 1978, 58 by a truck bomb in Beirut in 1983,
Pointing out that "a bloody war between Israel and Hezbollah broke out 10 years ago today", Ayrault said that ensuring that the "blue line" between Israel and Lebanon was respected is "a priority for France".
"I am here today with a message of support for our troops and Lebanese people," Ayrault said. "We also went to tell the Israelis on the other side of the border that we will do all we can to guarantee peace and security for all."
Ayrault was to meet Lebanese politicians, including Prime Minister Tammam Salam, on Tuesday.