Sometimes people just want to vent. They don't want solutions, they want someone to listen to and understand their problems. Sometimes it's better to just agree and listen to their problems (if you care to) rather than offer solutions to the problems. You can steer the conversation to a solution, or even just to something less moany or something you do want to talk about with questions about what they are talking about. For example "oh what are you studying? How are you finding the course/university? I really find really interesting but I've always wondered <insert thing you've wondered about or even know but think it will get them talking>" unless they hate their course then ask about what they would rather be doing, something like that.
Here I am offering a solution to someone with a gripe. Maybe you don't want that, maybe you need a comrade in the battle. I too like to solve problems, it took me a long time to realise the above issue and to find my own solution. Do you find it's mostly partners who want to vent or do you find your friends do as well?