Solutions do exist. Passive defenses like technology for tracking and analysis are useful in deploying government naval fleets, but shipowners need something useful to counter an immediate physical threat. Dazzler lasers proved their worth in Iraq for U.S. forces that needed a non-lethal way to deter physical threats. More powerful lasers can potentially disable the fast boats pirates like to use but these tools will probably be too expensive for commercial shippers. Pirates who manage to get their boats in close to a target ship typically fire grappling hooks onto its deck and shimmy up the attached line. The best way to defeat this threat is to simply cut the line.
The combination of dazzler lasers and anti-grappling line training can go a long way towards deterring pirate attacks without requiring commercial ship crews to become combatants. These simple technologies are available on the free market.