2012-06-12 104 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