SDL_Init Error when running C++ programs

Whenever I try to run a C++ program that uses SDL2, I get this error message:

“SDL_Init Error: No available video device”

Is there any way to fix this?

I am using the latest version of SDL, compiled from source. I am attempting to run these programs on Linux Mint 19.3.