3

我和这个问题有同样的问题。我尝试使用命令安装 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 库。

4

3 回答 3

1

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

$ sudo yum install pango-devel

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

$ sudo yum search foo

其中foo是您要查找的内容。yum将搜索名称、描述等。

于 2012-06-28T18:24:58.847 回答
0

libcairo 功能在 gnuplot 4.4 或更高版本中默认可用。gnuplot44 包可以在 epel 存储库中找到:https ://fedoraproject.org/wiki/EPEL

于 2015-04-15T12:48:24.540 回答
0

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

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

安装 gnuplot 5.0.1 的完整步骤:

从这里下载源文件,然后:

#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
于 2015-07-27T21:39:27.083 回答