The way you have phrased it yes you have to use "by" and the "ing" form.
I have tried to come up with a phrase but you have to turn it round.
I see no solution to this problem but / other than to kill her immediately.
There is no way to heal the break but/ other than to put a cast on it.
These work grammatically but they sound very unnatural to me.