Octave may throw an error if you run commands such as
plot without support for OpenGL in your graphics card.
x=(-1:0.1:1); y=x.^2; plot(x,y);
Use gnuplot instead of OpenGL for rendering graphics:
close all graphics_toolkit gnuplot x=(-1:0.1:1); y=x.^2; plot(x,y);
Add this command to
~/.octaverc so that it's always executed for all your scripts
The problem is that your graphics card driver doesn't support OpenGL.
You should either install OpenGL support if it exists or use another graphics driver.
Manually installed nvidia drivers are known to cause this error.