France is on its fifth republic. Their first republic started slightly after the US Constitution went into effect. Between those five republics they've had a couple of monarchies and military dictatorships. Though to be fair, a lot of those transitions resulted from France losing wars.
The coup was attempted by military that were not happy with the way things were going in Algeria (i.e. France was losing it). They were not the only ones, and France was coming apart at the seams.
De Gaul, who had been out of power since 1946 when he resigned, understood that he could unify the country behind him, and "proposed" himself as a mr fixit. He obtained the support of the various generals he still knew from WW II, got himself elected by the French, and lead the country for another 10 years (during which he ended up getting out of Algeria)
He was always very sensitive of having the confidence of the French, and at several occasions made it clear that he would go if such-and-such vote would not work out. He resigned in 1969 after losing a referendum on some subject.
https://en.wikipedia.org/wiki/May_1958_crisis_in_France