Elan Journo has an excellent short piece on dealing with piracy off the Coast of Somalia in his blog post “Ending the scourge of piracy?” His solution:
The substance of that warning: if any American vessel is captured by pirates, we will use military force to destroy every last pirate base in Somalia (and any neighboring African country). No country that harbors pirates can demand that its sovereignty be respected. When such a threat of retaliation is made fully credible, it can be sufficient to deter would-be aggressors. If any dare test us, then we must unapologetically respond with force.
Not just occasionally, when negotiations go south — but on principle.
When America has once again earned a reputation as a power that none dare cross, we won’t have to worry about pirates.
This appraoch is similar to the one America should take with terrorism in general. For details see Dr. Peikoff’s End States That Sponsor Terrorism.