there's only one thing for it
There is only a single course of action that can achieve the desired or necessary result; there is no alternative to a certain course of action. The virus wreaked so much damage that I'm afraid there's only one thing for it: we'll have to replace the entire computer infrastructure.
there’s only ˌone thing ˈfor it
there is only one possible course of action: Well, there’s only one thing for it, I’m afraid. You’re going to have to tell him what you’ve done and hope he forgives you.