2012-06-12 66 views
3

我遇到了与this question相同的问题。我尝试使用命令安装libcairo库如何在gnuplot中设置pngcairo终端?

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库。

+0

什么操作系统? Fedora也许? http://forums.fedoraforum.org/showthread.php?t=250946 – mgilson

+0

请注意,你也需要pango。你能从'configure.log'获得任何信息吗? – mgilson

+0

糟糕 - 抱歉。该文件是'config.log'。你应该找一些关于'pango'或'cairo'或'pangocairo'等的线条。 – mgilson

回答

1

pango只提供运行时库。对于发展的文件,你需要安装攀高-devel的

$ sudo yum install pango-devel 

当有关包名怀疑,用途:

$ sudo yum search foo 

其中是你在找什么。 yum将搜索名称,说明等。

0

之前编译,安装依赖库设在开罗的终端,比如pdfcairo,

sudo apt-get install libcairo2-dev 
sudo apt-get install libpango1.0-dev 

完整的步骤来安装的gnuplot 5.0.1:

here下载源文件,然后:

#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