The French hired a guy named Ferdinand de Lesseps to build it. And and he did such a great job that they also hired him to dig the Panama canal. The problem was, Panama didn't have the geology to support a sea level canal, which was all de Lesseps knew how to do. But what it did have were mosquitoes. And malaria. And yellow fever. And de Lesseps was out of his depth.
22,000 workers died from mosquito-borne diseases and construction accidents. So the French gave up.
The US took over, hiring Walter Reed to fix the mosquito problem and a series of engineers with solid track records on large projects to do the digging.
The French wasted 18 years in the attempt and the US finished the job in half that.
Panama Canal - The US had just built the Chicago Sanitary and Ship Canal. A lot of what they learned was directly applicable to building the Panama Canal.