When I make a roux for soups and sauces it always ends up tasting like the flour. What is the correct way to make roux? How long does the flour need to cook out of it?
Cook it longer, and watch your proportions. If it's too dry (not enough fat), it's hard to cook through without burning it. You want to get to a golden brown color throughout. You can cook it until it's darker and it'll add more caramel/nutty flavor (don't burn it), but it has to be at least a golden color before it's cooked enough to not taste of raw flour. When in doubt, taste it. If it tastes raw still, go a bit longer.
A good start for proportions is 1 part flour to one part fat--by weight, not by volume. Start with your fat in the pot, and get it nice and warm but not blazing hot, then add your flour a bit at a time, stirring (or better yet, whisking) for a couple of seconds to incorporate it smoothly before adding more. Stop adding (no matter how much flour you've used) when you get a slightly soft paste. Not too runny, but not as stiff as toothpaste either. I've yet to find a common thing people can agree on that has the right consistency to describe it, unfortunately. When you get the right consistency you need to keep stirring it over the heat until you get that golden brown color.
I admit that it's a little imprecise, but it really is a thing I do by feel and experience, based on what I said above as my original starting point. I've learned how I like it over the years, but I started with that.