Say it upfront.
If you lead with a comment like
I just want to vent a bit
and then go on to describe your frustrations, you've made it clear that what you want is to express your feelings, not that you are describing a problem you don't know how to solve. You've also avoided having the other person invest much time or effort into trying to help you figure out a solution, and therefore there is nothing to dismiss.
If the listener still tries to problem-solve (which will happen, at least sometimes), you can refer back to your initial comment that venting is all that you want. You told the listener that right away, so the issue isn't that you're rebuffing their help but that they misunderstood or forgot what you wanted.
The major issue I've encountered in situations like this one is that it's typically not very clear to all parties what the complainant wants (support vs. a solution) or what the listener expects. And it's frequently (but by no means always) the case that responding in the "wrong" way causes friction or distress. Clearly expressing what you want eliminates the uncertainty (though that doesn't guarantee that the listener will respond how you hope).
It can be hard to know what the "right" response is, and many people consider a statement like
to be dismissive and shallow (which isn't really inaccurate). Offering a solution, or trying to do so, can seem like an attractive alternative as it demonstrates attention to and engagement with the complaints. Letting someone know that your aim is to express something, more than to receive a solution to something, can help indicate what the proper mode of response is.
I've thought about and encountered this situation a lot, and I've come to feel that there is a two-sides-to-the-coin element to the seeking support/seeking solutions dynamic. Here are some observations I've made on the "other side" of this kind of interaction (if it matters for interpreting these, I am naturally inclined towards the "let's solve this problem" end of things):
What's primarily being asked for when someone wants to vent to me is my time and attention, with periodic comments from me expressing generic support (like "that sucks"). It doesn't really feel, to me, as though I'm participating because all I'm to do is offer a pre-determined, unvarying comment. That doesn't meant that it's an unreasonable thing to do, but it sometimes makes me feel replaceable and unimportant. The same things could be done by literally anyone, or even a notecard with the words "that sucks" written on it.
That sometimes makes it feel like an imposition on me, and sometimes that feeling produces odd effects in me. If it's one-off complaints about events in the day, that's usually fine. But if I hear complaints about the same issue, or type of issue, over and over again I can get a little bit resentful. If the issue is so bothersome that the venter needs this kind of support from me regularly, I might prefer that we try to solve the problem so that I don't need to have the same unsatisfying (for me) interaction over and over again. Resistance to that feels like the venter would rather regularly consume my time and attention than deal with the problem, which in effect creates a problem for me.
With the above in mind, I don't think that it's necessarily reasonable for anyone to expect their preferred mode of interaction all the time, simply because they want it. It's similarly unsatisfying for a person who only wants to problem-solve to have to listen and say "that sucks" at intervals as it is for someone who only wants a "that sucks" response to deal with someone trying to solve the problem. When both parties are in sync then there is no issue. When they're not, one party getting what they want is something of an imposition on the other, and that's worth keeping in mind.