I'm curious why you want to target 2.1 specifically? A lot of drivers these days don't go below 3.x
And just changing the shader to #version 330 often isn't enough, that's why we need to see your setup code either way.
Preferably a minimally reproducible example project that we can build and test to be able to tell you exactly what's wrong with your code.
Not everyone wants to live in the terminal. I would argue most people don't.