Gnuplot terminal set to 'unknown'

I installed version 4.6.4 of gnuplot recently on my system running 10.04 ubuntu linux. I am getting error
Terminal type set to 'unknown'
Also when i try to set term X11 or wxt i get error
Terminal type set to 'unknown'
^
unknown or ambiguous terminal type; type just 'set terminal' for a list

There was no such issue with the earlier version 4.2.

Please help!!

info gnuplot
Did you set the type this way?

How did you install GNUplot?

@corona688 : Could you plz tell me how to set the DISPLAY variable?

@DGPickett : I installed using a tar.gz downloaded from sourceforge

Also can anyone tell me how to uninstall the above so that I can go back to using the older working version.

By compiling it yourself, you've probably left nearly every video output module disabled. If you wanted them all, you'd likely need to install dozens of different development libraries to get them all.

What's your distribution? You almost almost never install using source .tar.gz's -- usually you download and install binaries for your distribution. They're more likely to be found wherever your distribution keeps such things than on sourceforge.

After you install and before you run, you need to configure it as described in the link.

If the binaries are available and you have enough permissions to install them, they are usually simpler than a configure/make. Either way, you get default options until you configure. I just used the installer in Ubuntu, mostly, or binaries.