【问题标题】:How do I setup pngcairo terminal in gnuplot?如何在 gnuplot 中设置 pngcairo 终端?
【发布时间】:2012-06-12 21:56:09
【问题描述】:

我遇到了与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 库。

【问题讨论】:

  • 什么操作系统?可能是 Fedora? forums.fedoraforum.org/showthread.php?t=250946
  • 请注意,您还需要 pango。你能从configure.log得到任何信息吗?
  • 糟糕——抱歉。该文件是config.log。您应该寻找有关pangocairopangocairo 等的行。
  • 我在红帽公司。我通过 yum 安装了 pango 和 cairo-devel,但是当我安装 gnuplot 时,它没有找到它们。当我尝试从源代码制作 gnuplot 时,它也看不到库,如果我尝试自己构建它们,它只会让我陷入依赖地狱。我将从 config.log 中添加相关行
  • 试试locate pango.pclocate pangocairo.pc。如果 locate 发现了什么,那是个好消息。将它添加到路径中——(假设你在 bash 中),类似export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}:/path/to/pango.pc(没有pango.pc 部分)可能会有所帮助。

标签: gnuplot cairo


【解决方案1】:

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

$ sudo yum install pango-devel

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

$ sudo yum search foo

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

【讨论】:

    【解决方案2】:

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

    【讨论】:

      【解决方案3】:

      在编译之前,为基于cairo的终端安装依赖库,如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
      

      【讨论】:

        猜你喜欢
        • 2012-05-16
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-07-05
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多