Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing Gnuplot 5.0 on Ubuntu

I have been trying to install Gnuplot 5.0 from source on Ubuntu.

I followed the procedure given in the blog:

Installing gnuplot from source

I used the following commands:

tar xzf gnuplot-5.0.0.tar.gz
mkdir build
cd build
../gnuplot-5.0.0/configure --with-readline=gnu
make

Everything until the configure command works fine. However, I end up getting the following error when I run the make command:

In file included from ../../gnuplot-5.0.0/src/qtterminal/QtGnuplotWindow.cpp:187:0:

./ui_QtGnuplotSettings.h:13:25: fatal error: QtGui/QAction: No such file or directory

#include <QtGui/QAction>

Could someone guide on how to fix this issue? If there is an alternative easier way to install gnuplot 5.0.0. that would be helpful as well.

like image 567
Ravi Avatar asked Apr 08 '15 21:04

Ravi


2 Answers

Here's a compilation of the various library-dev packages necessary for gnuplot in ubuntu. The package names should be the same under debian, and other distributions based on debian, like Mint. Additional -dev packages that are installed automatically with the ones named are not listed or in (parentheses).

To use external libreadline instead of gnuplot's builtin replacement (recommended)

libreadline-dev

To have the mathematical functions provided by the cerf library (can't hurt)

libcerf-dev

For the old interactive x11terminal

libx11-dev

For the pdfcairo, pngcairo, epscairo terminals

libcairo2-dev
libpango1-dev

additionally for the interactive wxt terminal (try ./configure --with-wx-single-threaded in case of problems (e.g. make check crashes). If it doesn't compile with complaints about "XInitThreads", try TERMLIBS="-lX11" ./configure.)

libwxgtk2.8-dev or libwxgtk3.0-dev
libgtk2.0-dev

For the libgd-based png, gif, jpeg bitmap terminals

libgd-dev
(libxpm-dev)
(libjpeg-turbo8-dev)
(libtiff5-dev)

For the interactive qt terminal (./configure --with-qt=qt5)

qtbase5-dev
libqt5svg5-dev
qttools5-dev-tools  # on Linux Mint (as per comment by Allan below)

alternatively for qt4 (./configure --with-qt=qt4)

libqt4-dev

For the lua terminal

liblua5.2-dev (also read ./INSTALL)

For the text-mode caca terminal (./configure --with-caca)

libcaca-dev

The list is not final (i don't have a spare system to try out all the dependencies at the moment). Feel free to add, update and correct!

like image 150
Karl Avatar answered Oct 20 '22 19:10

Karl


I simply followed the instructions in the file INSTALL and it worked perfectly:

$ tar xzf gnuplot-5.0.1.tar.gz
$ cd gnuplot-5.0.1
$ ./configure
$ make
$ sudo make install

After doing this, when I call gnuplot anywhere, the result is

$ gnuplot

G N U P L O T
Version 5.0 patchlevel 1    last modified 2015-06-07 

Copyright (C) 1986-1993, 1998, 2004, 2007-2015
Thomas Williams, Colin Kelley and many others

gnuplot home:     http://www.gnuplot.info
faq, bugs, etc:   type "help FAQ"
immediate help:   type "help"  (plot window: hit 'h')
like image 33
bmello Avatar answered Oct 20 '22 18:10

bmello