Fix for missing png terminal in gnuplot
In production servers where there is no GUI is required when we install package like gnuplot, some of the graphic support libraries will be missing. So when I try to list or produce png output of my graph it throws error saying the png terminal option is missing.
In my case it was the png terminal that was missing. Without png terminal I won’t be able to produce a png output of the plot I wanted to create.
To fix this issue we just need to install the required libraries and recompile and reinstall gnuplot.
By doing a quick google I figgured out the library to be installed is this http://libgd.github.io/.
$ sudo apt-get install libgd2-dev
$ cd gnuplot-5.0.4
$ ./configure
$ make
$ make install
Now if you try to list the available terminals in gnuplot it will list the png terminal as well.