无法在linux下安装Cairo包

无法在linux下安装Cairo包,r,cairo,R,Cairo,我在本地下载该软件包并使用atempt进行安装,但出现以下错误: R CMD INSTALL -l /usr/local/lib64/R/library Cairo_1.5-1.tar.gz checking for PNG support in Cairo... yes checking for ATS font support in Cairo... no configure: CAIRO_LIBS=-L/usr/local/lib -lcairo ch

我在本地下载该软件包并使用atempt进行安装,但出现以下错误:

    R CMD INSTALL -l /usr/local/lib64/R/library Cairo_1.5-1.tar.gz
   checking for PNG support in Cairo... yes
   checking for ATS font support in Cairo... no
    configure: CAIRO_LIBS=-L/usr/local/lib -lcairo
    checking for library containing deflate... no
     checking whether Cairo programs can be compiled... configure: error: Cannot     
    compile a simple Cairo program. See config.log for details.
    ERROR: configuration failed for package 'Cairo'
   * removing '/usr/local/lib64/R/library/Cairo'
我知道他的错误:

    R CMD INSTALL -l /usr/local/lib64/R/library Cairo_1.5-1.tar.gz
   checking for PNG support in Cairo... yes
   checking for ATS font support in Cairo... no
    configure: CAIRO_LIBS=-L/usr/local/lib -lcairo
    checking for library containing deflate... no
     checking whether Cairo programs can be compiled... configure: error: Cannot     
    compile a simple Cairo program. See config.log for details.
    ERROR: configuration failed for package 'Cairo'
   * removing '/usr/local/lib64/R/library/Cairo'

有什么想法吗?感谢

我必须安装x11 Linux库,并且能够编译Cairo。

我通过首先从终端安装libcairo2包,成功地在R for Linux(3.0.2版)上安装了Cairo:

    sudo apt-get install libcairo2-dev
然后,打开R并使用安装Cairo

    install.packages("Cairo")

我想是因为你没有安装libcairo2?但是,您可以查看config.log以了解详细信息。另外,如果您使用
install.packages('Cairo')
R
中安装,您可能会收到更多描述性错误消息,当我尝试使用R安装时,出现相同的错误。未安装libcairo2。我的服务器没有任何internet连接,你知道我可以在哪里本地安装这个libcairo2。所以。。。为什么不起作用?把它下载到你的机器上,scp到服务器上,然后你就可以走了!对于Centos论坛来说,这听起来是个不错的问题!对不起,我帮不上什么忙,但你离解决问题更近了!你能再详细一点吗,你需要安装哪些库?在macOS上,我需要运行
brew安装libxt
(libxt是X Toolkit Intrinsicts)。我知道这个答案很古老,但仍然相关;您需要确保知道您正在使用的包管理器,并查找cairo-dev包的发行版本(即可能是基于非debian的Linux系统上的其他包,Red Hat rpm包是cairo-devel)