在Ubuntu上安装Gnuplot 5.0

我一直在试图从Ubuntu上安装Gnuplot 5.0。

我遵循博客中给出的程序:

从源代码安装gnuplot

我使用了以下命令:

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

一切,直到configuration命令工作正常。 但是,当我运行make命令时,我最终得到以下错误:

 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> 

有人可以指导如何解决这个问题? 如果有另一种更简单的方法来安装gnuplot 5.0.0。 这也会有帮助。

下面是ubuntu中gnuplot所需的各种库-dev包的编译。 使用指定名称自动安装的其他-dev软件包未列出或位于(括号内)中。

对于旧的交互式x11终端

 libx11-dev 

对于pdfcairopngcairoepscairo终端

 libcairo2-dev libpango1-dev 

另外对于交互式的wxt终端(尝试./configure --with-wx-single-threaded在遇到问题的情况下(例如, make check崩溃)。如果它没有编译关于“XInitThreads”的投诉,请try TERMLIBS="-lX11" ./configure 。)

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

对于基于libgd的pnggifjpeg终端

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

对于交互式qt终端( ./configure --with-qt=qt5

 qtbase5-dev libqt5svg5-dev 

或者对于qt4( ./configure --with-qt=qt4

 libqt4-dev 

对于lua终端

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

对于文本模式的caca终端( ./configure --with-caca

 libcaca-dev 

要使用外部libreadline而不是gnuplots内置替换(推荐)

 libreadline-dev 

要有由数据库提供的数学函数(不能伤害)

 libcerf-dev 

这个列表并不是最终的(我没有一个备用的系统来尝试所有的依赖关系)。 随意添加,更新和更正!

我只是按照INSTALL文件中的说明完成工作:

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

做完这个之后,我在任何地方调用gnuplot,结果是

 $ gnuplot GNUPLOT 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')