如何在gnuplot中设置pngcairo终端?

时间:2012-06-12 21:56:09

标签: gnuplot cairo

我遇到与this question相同的问题。我尝试使用命令

安装libcairo库
sudo yum install cairo-devel

之后,我通过yum删除并安装了gnuplot。我仍然得到同样的错误。还有什么办法让gnuplot让我使用pngcairo?

我还通过yum安装了pango。

当我尝试从源代码安装gnuplot时,我在config.log中收到这些消息:

configure:11776: checking for CAIROPANGO
configure:11784: $PKG_CONFIG --exists --print-errors "cairo >= 0.9.0 pango >= 1.10 pangocairo >= 1.10"
Package pango was not found in the pkg-config search path.
Perhaps you should add the directory containing `pango.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pango' found
Package pangocairo was not found in the pkg-config search path.
Perhaps you should add the directory containing `pangocairo.pc'
to the PKG_CONFIG_PATH environment variable
No package 'pangocairo' found

我究竟要向PKG_CONFIG_PATH添加什么?我甚至不确定在哪里可以找到我安装的pango和cairo-devel库。

3 个答案:

答案 0 :(得分:1)

pango仅提供运行时库。对于开发文件,您需要安装 pango-devel

$ sudo yum install pango-devel

如果对包名称有疑问,请使用:

$ sudo yum search foo

foo 正是您要找的地方。 yum 将搜索名称,描述等。

答案 1 :(得分:0)

默认情况下,gcauplot 4.4或更高版本中提供了libcairo功能。 gnuplot44包可以在epel存储库中找到:https://fedoraproject.org/wiki/EPEL

答案 2 :(得分:0)

在编译之前,安装基于cairo的终端的依赖库,如pdfcairo,

#decompress it:
tar -xvf gnuplot-5.0.1.tar.gz

#install the dependency libraries for cairo-based terminals, like pdfcairo
sudo apt-get install libcairo2-dev
sudo apt-get install libpango1.0-dev


#build it:
cd gnuplot-5.0.1 
./configure 
make

#install it:
sudo make install

安装gnuplot 5.0.1的完整步骤:

rspec has bound its own lambda to下载源文件,然后:

a=input()
d=a.strip(' ')
a=int(d[0])
b=int(d[2])
c=int(d[4])
for i in range(0,c-2):
    p = b**2 + a
    a=b
    b=p
print (p)

#This code is working fine, if the input is: 0 1 9 but not when the input is: 0 1 10
相关问题